I have developed a UIForm programmatically. When i am executing the application i am getting the following error:
app = QApplication(sys.argv)
Widget = QWidget()
layout = QVBoxLayout()
label = QLabel("VAR")
buttonBox = QDialogButtonBox(QDialogButtonBox.Ok|QDialogButtonBox.Cancel)
layout.addWidget(label)
layout.addWidget(buttonBox)
Widget.resize(QSize(200, 200))
Widget.move(50,450)
Widget.setLayout(layout)
Widget.show()
***Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'module' object has no attribute 'argv'***
But when i am using:
app = QtGui.QApplication([])
the Qgis server window is disappearing. So if i want the QWidget to execute how can i do that?
Aucun commentaire:
Enregistrer un commentaire