Open a dialog from MainWindow - pyQT4 - Beginner :-)

Florian Wollenschein Florian.Wollenschein at FernUni-Hagen.de
Mon May 4 13:31:38 EDT 2009


Dear folks,

I'm just working on a pyQT4 version of my txt to html converter thc (see 
listick.org for details).

I created the MainWindow with QT Designer and then converted it to .py 
with pyuic4. It works well so far. Then I created a new UI for my 
abtDialog (about dialog for my application). I did the same as with the 
MainWindow, so I have two UIs and two *_ui.py files now. How can I open 
the dialog from my main application class?

Here's part of the code I'm using:

...
self.connect(self.actionAbout,
                 QtCore.SIGNAL("triggered()"), self.OpenAbout)
...
  def OpenAbout(self):
         pass
...

The OpenAbout function should open the dialog. I've already tried a 
abtDialog.show() after creating it via abtDialog = ThcAboutDialog() 
(ThcAboutDialog is the class for this dlg).

Any ideas?

Thanks,
Listick Lorch
http://www.listick.org

PS: Keep in mind that I'm quite a beginner in the field of python and qt...



More information about the Python-list mailing list