Re: [PyQt] Problem with class inheriting QDialog

2009-11-23 Thread dizou
nickgaens wrote: > > > > > > > > dizou schreef: > > What does that mean? > > One thing I thought I could do is have my TreeWidget have a > GetSelectedItem > function. Then in my Main Window, when I click the button, it calls a > function that will call the GetSelectedItem function,

Re: [PyQt] Problem with class inheriting QDialog

2009-11-23 Thread Nick Gaens
dizou schreef: What does that mean? One thing I thought I could do is have my TreeWidget have a GetSelectedItem function. Then in my Main Window, when I click the button, it calls a function that will call the GetSelectedItem function, then emit a signal with the return value as a parameter

Re: [PyQt] Problem with class inheriting QDialog

2009-11-23 Thread dizou
Hans-Peter Jansen-2 wrote: > > Your best bet is using the selection model > in your signal handler to figure out, which items where selected > What does that mean? One thing I thought I could do is have my TreeWidget have a GetSelectedItem function. Then in my Main Window, when I click the bu

Re: [PyQt] Problem with class inheriting QDialog

2009-11-23 Thread Hans-Peter Jansen
On Monday 23 November 2009, 15:56:24 dizou wrote: > I've got this fixed, thank you. I had another typo I didn't catch. > > What I am trying to do is pass a parameter through the signal. I have a > QTreeWidget object under my MainWindow class with a bunch of items in it. > I want the signal to pass

Re: [PyQt] Problem with class inheriting QDialog

2009-11-23 Thread dizou
I've got this fixed, thank you. I had another typo I didn't catch. What I am trying to do is pass a parameter through the signal. I have a QTreeWidget object under my MainWindow class with a bunch of items in it. I want the signal to pass in the item I have selected when I click my button. How d

Re: [PyQt] Problem with class inheriting QDialog

2009-11-21 Thread Mark Summerfield
On 2009-11-20, dizou wrote: > Dialog.py: > > import sys > from PyQt4.QtGui import QDialog > > def Dialog(QDialog): I assume that's a typo above and that you've really got: class Dialog(QDialog): > def __init__(self, parent): > QDialog.__init__(self, parent) > > MainWin

Re: [PyQt] Problem with class inheriting QDialog

2009-11-20 Thread David Douard
Looks like you are not calling QMainWindow base constructor. Le Friday 20 November 2009 17:44:30 dizou, vous avez écrit : > Dialog.py: > > import sys > from PyQt4.QtGui import QDialog > > def Dialog(QDialog): > def __init__(self, parent): > QDialog.__init__(self, parent) > > M

Re: [PyQt] Problem with class inheriting QDialog

2009-11-20 Thread dizou
Dialog.py: import sys from PyQt4.QtGui import QDialog def Dialog(QDialog): def __init__(self, parent): QDialog.__init__(self, parent) MainWindow.py: from PyQt4.QtCore import SIGNAL, SLOT, QDir, QFile from PyQt4.QtGui import QApplication, QMainWindow, QMenu, QMessageBox,

Re: [PyQt] Problem with class inheriting QDialog

2009-11-19 Thread Phil Thompson
On Thu, 19 Nov 2009 13:45:31 -0800 (PST), dizou wrote: > I have a class Dialog inheriting a QDialog: > > def Dialog(QDialog): > def __init__(self, parent): > QDialog.__init__(self, parent) > > I have a MainWindow class that inherits QMainWindow that creates the Dialog > class

[PyQt] Problem with class inheriting QDialog

2009-11-19 Thread dizou
I have a class Dialog inheriting a QDialog: def Dialog(QDialog): def __init__(self, parent): QDialog.__init__(self, parent) I have a MainWindow class that inherits QMainWindow that creates the Dialog class: class MainWindow(QMainWindow): def __init__(self): #