pyqt4 eric4 generated gui custom dialog open

rewonka rewonka at gmail.com
Tue Dec 15 08:39:54 EST 2009


Hi,

I've made a little application with mainwindow and one dialog
(something like input dialog).
I can't open the input dialog from my mainwindow

I tried to open the dialog with a button, here is a code:
    @pyqtSignature("")
    def on_BtnAdd_clicked(self):
        """
        Open input dialog for some data input
        """
        Dialog = QDialog()
        ui = DlgAdd()
        ui.setupUi(Dialog)
        Dialog.show()

and if I clicked the button , it's like the dialog open and disappear.
I searched a lot and found , that i need something to connect, but i
didn't found how (exactly source code). On the dialog i have two
button (OK,Cancel).
As i saw the generated code for pyqt has line like this:
    QtCore.QMetaObject.connectSlotsByName(MainWindow)
I think that's mean i don't need to connect, if i have the function
for it,but I don't know how to write??

Thank for Help,
Rewonka



More information about the Python-list mailing list