Thanks Phil! I guess I didn't look far enough... Sure enough, I get the expected results on any UNIX.
Anyone have a clue how to get a useful winId out of Windows at the python/PyQt level? In C++ I'm looking at code that gets the winId like this: long my_windowid = (long)((QWidget *) this)->winId(); Of course, I don't fully understand that code yet, which is why I'm trying to do something simple in python first. :) Dave -----Original Message----- From: Phil Thompson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 5:31 AM To: Smith, Dave Cc: PyQt/KDE Mailing List (E-mail) Subject: Re: [PyKDE] QWidget.winId() not working? "Smith, Dave" wrote: > > Looks like QWidget.winId() is broken in at least PyQt 3.1. When I try to use it I >get: > > Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> from qt import * > >>> qApp = QApplication([]) > >>> button = QPushButton(None) > >>> button.winId() > <PyCObject object at 0x007E9DA0> > >>> > > According to the PyQt documentation it is implemented. > > I was expecting an integer value to be returned, in Qt, WId > is declared as 'typedef int WId;' in qwindowdefs.h. I think you are mis-reading qwindowdefs.h. It's an int like type on everything except Windows. Phil _______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
