[PyQt] Bug in sip-4.9.2-snapshot-20091108 handling virtual methods

2009-11-12 Thread Simon Edwards
Hello Phil, Using sip-4.9.2-snapshot-20091108 here I've got a class with a public: class WallpaperScript : Plasma::ScriptEngine { // ... public: virtual voidinitWallpaper (const KConfigGroup& config); // ... } When it is called from C++ I get a TypeError that 4 args were given

[PyQt] designer and events

2009-11-12 Thread bytecolor
How do I implement events for widgets created with designer/pyuic4 ? I've added a couple of QListWidgets in designer, but I need to modify the default behaviour of drag and drop between the two widgets. I've inherited from QListWidget and implented the behaviour in a seperate module, reimplementin

Re: [PyQt] inheriting QTreeWidgetItem Question

2009-11-12 Thread Darryl Wallace
Hello, > > So I have this now: > > class A(QTreeWidgetItem): >def __init__(self, parent): >QTreeWidgetItem.__init__(parent) > Try this: class A(QTreeWidgetItem): def __init__(self, parent=None): QTreeWidgetItem.__init__(self, parent)# the first argument is always SELF.

Re: [PyQt] inheriting QTreeWidgetItem Question

2009-11-12 Thread dizou
Phil Thompson-5 wrote: > > On Thu, 12 Nov 2009 10:36:34 -0800 (PST), dizou wrote: >> I am trying to get a class i wrote that inherits QTreeWidgetItem to > display >> on the QTreeWidget. If I used just the normal QTreeWidgetItem I would > have >> code like this: >> >> tree = QTreeWidgetItem(sel

Re: [PyQt] inheriting QTreeWidgetItem Question

2009-11-12 Thread Phil Thompson
On Thu, 12 Nov 2009 10:36:34 -0800 (PST), dizou wrote: > I am trying to get a class i wrote that inherits QTreeWidgetItem to display > on the QTreeWidget. If I used just the normal QTreeWidgetItem I would have > code like this: > > tree = QTreeWidgetItem(self) > tree.setFlags(...) > tree.setIcon(

[PyQt] inheriting QTreeWidgetItem Question

2009-11-12 Thread dizou
I am trying to get a class i wrote that inherits QTreeWidgetItem to display on the QTreeWidget. If I used just the normal QTreeWidgetItem I would have code like this: tree = QTreeWidgetItem(self) tree.setFlags(...) tree.setIcon(...) tree.setText(...) However I have a class that inherits the QTre

Re: [PyQt] restoreState not working for QDockWidgets

2009-11-12 Thread Brian Zambrano
Hi guys, I hear ya...it's something I've found a bit hard with GUI programming. The code gets quite large and involved, so boiling it down to a self contained example demonstrating the issue takes some work. But, I agree it's worth doing and the issue very well may be solved during that exercise

[PyQt] Capturing WindowChangeEvent in KDE

2009-11-12 Thread Raja
Hi Im a newbie on KDE and PyKDE and am trying to write a python snippet that will listen for window switches (Alt-Tab or clicking on taskbar) and write to a logfile for a particular user. I saw a few examples that use QObject.connect with "activeWindowChanged" signal. There are couple of problems

Re: [PyQt] restoreState not working for QDockWidgets

2009-11-12 Thread Hans-Peter Jansen
On Thursday 12 November 2009, 09:08:09 Brian Zambrano wrote: > The relevant pieces are basically this...have the main window save state > when it closes. On startup, the main window passes itself to a QSettings > wrapper where the state should be restored. The resize works just fine, > the dock w

Re: [PyQt] restoreState not working for QDockWidgets

2009-11-12 Thread Phil Thompson
This is not a self contained example, ie. one that we can run. How do you know that these are the "relevant pieces"? By presenting us with a fragment of code you are making the assumption that it must demonstrate the problem - even though you have already said you don't know what the problem is. O

Re: [PyQt] insert a radio button in menu of menubar

2009-11-12 Thread Mads Ipsen
vidyadhar wrote: I want to have a radio button on menu entries in the menubar. eg: like a gedit in linux please help me out thanks * Set up the desired QAction's. * Add them to a QActionGroup. * Set the group to be exclusive (setExclusive(True)). * Add the actions to your menubar. -- +---

Re: [PyQt] restoreState not working for QDockWidgets

2009-11-12 Thread Brian Zambrano
The relevant pieces are basically this...have the main window save state when it closes. On startup, the main window passes itself to a QSettings wrapper where the state should be restored. The resize works just fine, the dock widgets states do not work: class MyMainWindow(QMainWindow): def