Skip to content Skip to sidebar Skip to footer

In Pyqt4, How Do I Open New Window From Existing One?

I want to open new window from existing one in pyqt. My source code has two functions. one functions : when button is clicked, File Dialog is opened. another functions : when anot

Solution 1:

The line self.w.show, where you've declared w as a Ui_dialog object, will attempt to call the show instance variable inside Ui_dialog, which doesn't work because you've never defined any function called show.

It doesn't help that you've inherited object for class Ui_dialog. You should probably inherit QtGui.QDialog for that class, and rewrite your class accordingly.

Post a Comment for "In Pyqt4, How Do I Open New Window From Existing One?"