From boud at valdyas.org Mon Apr 1 23:03:43 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Official announcement of PyQt book Message-ID: <200204011857.g31IvT6N096944@smtpzilla3.xs4all.nl> Well, I'd like to finally officially announce that my book, _GUI Programming with Python using the Qt Toolkit_ is now officially available on paper. Whew! You buy it directly from the publisher's website: http://www.opendocs.org, or, preferably, at your favourite local or on-line bookshop. For instance, Amazon lists it as: http://www.amazon.com/exec/obidos/ASIN/0970033044/qid=1017685892/sr=8-1/ref=sr_8 _1_1/103-3219259-3855046 (And I wonder how that's going to come across.) The ISBN is 0-97003300-4-4. Anyway, I've written about 160.000 words of English prose and code, all about Qt, PyQt, sip, Qt Designer and BlackAdder. I cover both Qt 2 and Qt 3 in a lot of detail. All source code to the examples is included on a cd-rom, and Opendocs will shortly open a webforum where I'll post updated code and where people can discuss problems. You can read the book online at: http://www.opendocspublishing.com/pyqt. -- Boudewijn Rempt | http://www.valdyas.org From shawn at thekompany.com Mon Apr 1 23:03:45 2002 From: shawn at thekompany.com (Shawn Gordon) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Gui Programming With Python : Using the Qt Toolkit Message-ID: <5.1.0.14.2.20020401110736.03492b50@valentine.thekompany.com> Hi all, The long awaited book on PyQt programming "Gui Programming With Python : Using the Qt Toolkit" is now availabe, and we have it for a special price. The book is over 500 pages of PyQt goodness, which a chapter on SIP and one on BlackAdder. The bundled CD comes with a demo of BlackAdder as well as source and binary versions of Python 2.2. We've managed to get a hold of some inventory at a special price (this book is $49.95 on Amazon and takes a month to ship http://www.amazon.com/exec/obidos/ASIN/0970033044/qid%3D1017685892/sr%3D8-1/ref%3Dsr%5F8%5F1%5F1/102-1637269-9568909). We aren't going to add it to our web site, we are only taking direct orders on this. We will sell this for $35 which will include shipping and handling in the US and $40 for international. We will be shipping within a week of the order. Either call with your order at the number below, or privately email your credit card information to process. Regards, Shawn Gordon President theKompany.com www.thekompany.com 949-713-3276 From lloyd at lancaster.lib.pa.us Mon Apr 1 23:52:58 2002 From: lloyd at lancaster.lib.pa.us (Eron Lloyd) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Official announcement of PyQt book In-Reply-To: <200204011857.g31IvT6N096944@smtpzilla3.xs4all.nl> References: <200204011857.g31IvT6N096944@smtpzilla3.xs4all.nl> Message-ID: <1017698179.1369.24.camel@linux> I'd just like to say "Thank You!" for putting in the time to produce an excellent reference to an excellent piece of software. This book, along with the fantastic work from Phil, Jim, and all the other contributors to PyQT/PyKDE, there is a very exciting future ahead for the Python GUI. I can't wait for my copy to get here! Sincerely, Eron On Mon, 2002-04-01 at 16:56, Boudewijn Rempt wrote: > Well, I'd like to finally officially announce that my book, _GUI Programming > with Python using the Qt Toolkit_ is now officially available on paper. Whew! > > You buy it directly from the publisher's website: http://www.opendocs.org, > > or, preferably, at your favourite local or on-line bookshop. For instance, > Amazon lists it as: > > http://www.amazon.com/exec/obidos/ASIN/0970033044/qid=1017685892/sr=8-1/ref=sr_8 > _1_1/103-3219259-3855046 > > (And I wonder how that's going to come across.) The ISBN is 0-97003300-4-4. > > Anyway, I've written about 160.000 words of English prose and code, all about > Qt, PyQt, sip, Qt Designer and BlackAdder. I cover both Qt 2 and Qt 3 in a > lot > of detail. > > All source code to the examples is included on a cd-rom, and Opendocs will > shortly open a webforum where I'll post updated code and where people can > discuss problems. > > You can read the book online at: http://www.opendocspublishing.com/pyqt. > > -- > Boudewijn Rempt | http://www.valdyas.org > > > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde > --- > [This E-mail scanned for viruses by Declude Virus] > > --- [This E-mail scanned for viruses by Declude Virus] From jbublitz at nwinternet.com Tue Apr 2 19:42:53 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] gcc2.96 In-Reply-To: <200204021000.MAA15959@mats.gmd.de> Message-ID: Bill Soudan is testing gcc2.96 fixes right now (and finding some bugs in the fixes). When he's done, I'll have a little cleanup and packaging to do, so we should have a repair kit for PyKDE2/gcc2.96 in about a week or so. The next full release will be "shortly" after KDE3.0 final is released. It'll probably be a sip3.0 release followed shortly after by a sip3.1 release. Jim From jbublitz at nwinternet.com Tue Apr 2 19:42:54 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: Official announcement of PyQt book In-Reply-To: <200204021000.MAA15959@mats.gmd.de> Message-ID: On 02-Apr-02 Eron Lloyd wrote: > I'd just like to say "Thank You!" for putting in the time to > produce an excellent reference to an excellent piece of > software. I've looked at Boudewijn's book online and have been very impressed. I like the clarity of his style and the completeness and level of detail. I usually go to Amazon for the ISBN and then have my local independent bookseller order for me. > This book, along with the fantastic work from Phil, > Jim, and all the other contributors to PyQT/PyKDE, there is a > very exciting future ahead for the Python GUI. Aw, shucks. Everyone on this list can take some credit for PyQt/PyKDE - even if all you've done is download a copy (I watch the numbers on riverbankcomputing.co.uk). Until you've actually done an open source project, you can't appreciate how important the user base is to the success of the project, whether it's contributions, suggestions, bug reports, comments or just showing some interest. Right now I'm writing some C++ for a new project using Qt/KDE and it's just reminding me what an excellent code base we have to work from. When you get a chance, thank the TrollTech and KDE guys too. Jim From jgardn at alumni.washington.edu Thu Apr 4 12:51:48 2002 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Segmentation falue on exit... caused by QLineEdit? Message-ID: <20020404200550.B26236@linux.hananet.net> I am running with PyQt-3.1-Qt-2.3.1.tar.gz and sip-3.1.tar.gz on Qt 2.3.1 (compiled from sources with threading) and Python 2.1.2 (with threading but not gnu-pth.) My base system is Linux 2.4.18 with GNU C Library 2.2. I run the code below, and when it exits (by clicking on the exit button - X Windows 4.2.0 with BlackBox), it causes a segmentation fault. Other widgets besides the QLineEdit widget won't cause a segfault. (I have tried QLabel and QPushButton.) Also, adding "del w" at the end after a.exec_loop() solves the problem. This is odd, because I thought I was running PyQt-3.1 and sip-3.1 earlier with no problems at all. Of course, I have upgraded a lot of things, so it is hard to tell what exactly changed. I read in an email from a long time ago that this was fixed in newer versions. Has it popped its ugly head up again? Or am I just on a really strange system? Jonathan THE CODE: import sys from qt import * class my_widget(QWidget): def __init__(self,parent = None,name = None,fl = 0): QWidget.__init__(self,parent,name,fl) self.input = QLineEdit(self) if __name__ == '__main__': a = QApplication(sys.argv) QObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()')) w = my_widget() a.setMainWidget(w) w.show() a.exec_loop() del w From jgardn at alumni.washington.edu Thu Apr 4 17:58:23 2002 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] shaped windows and QWidget.setMask Message-ID: <20020405011256.A25419@linux.hananet.net> Someone posted a while ago about how to do shaped windows in Qt. The answer is still "I don't know" but I have found a clue by looking at the tuXeyes source code. I think QWidget.setMask is what you are looking for. I was interested in what it would take to do something with OpenGL and then using a mask, and this is it apparently. I haven't actually used it yet, but like all things Qt, I doubt there will be a problem. Jonathan PS: I would've replied to keep things in the thread, but it seems that I've lost the email between several re-installations. =( From jbublitz at nwinternet.com Thu Apr 4 18:17:47 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Possible bug - PyKDE2 'generic' In-Reply-To: <200204031000.MAA05004@mats.gmd.de> Message-ID: If you're building PyKDE2 from the 'generic' package *and* using Qt2.3.2, there *may* be a problem with the 'build' script included in the package. The build script requires a '-q' switch followed by the Qt version you're using, for example: build -q232 ... for Qt2.3.2. This is for conditionally building for the correct Qt version from the PyQt sip files. Unfortunately, there is no specific Qt 2.3.2 versioning (it uses Qt 2.3.1 instead) and this may screw up code generation - I don't have Qt 2.3.2 installed anywhere so can't test it. The solution is to simply substitute '-q231' and everything should work. Future releases [1] should handle this silently so you'll be able to specify your actual Qt version and the build script will substitute the corresponding version number PyQt needs. This is not a problem with running Qt 2.3.2, it's a problem with PyKDE2 specifying the correct parameters for generating code. Qt 2.3.2 should work fine. This ONLY affects PyKDE2, NOT PyQt. Thanks to Bill Soudan for discovering the problem and fix. Jim [1] I looked for KDE3.0 sources yesterday but couldn't find them. Also couldn't find SuSE rpms. I'll try again today. I'll start on the next PyKDE2 release as soon as I have the KDE source code for kdelibs (and finish my tax returns :( ) From eli.carter at inet.com Thu Apr 4 19:44:14 2002 From: eli.carter at inet.com (Eli) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] (newbie) async stuff Message-ID: <3CAC90E5.5070904@inet.com> (If this isn't the right place to ask, please point me in the right direction. I'm a bit new to python, Qt, and pyQt.) I have data coming in over a pipe, and a text area where I display it. I'd like the text area to be updated whenever data comes in over said pipe. I'm not sure how to do that... Is there a way to register fd's and call-backs with the exec_loop() or something? If there is documentation that addresses this, please point me to it; I haven't found anything about this in my google'ing. TIA, Eli --------------------. "If it ain't broke now, Eli Carter \ it will be soon." -- crypto-gram eli.carter(a)inet.com `------------------------------------------------- From gregory.p.green at boeing.com Thu Apr 4 20:14:58 2002 From: gregory.p.green at boeing.com (Greg Green) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] (newbie) async stuff In-Reply-To: <3CAC90E5.5070904@inet.com> References: <3CAC90E5.5070904@inet.com> Message-ID: <15532.38932.644553.951208@skorch.rt.cs.boeing.com> Eli writes: > (If this isn't the right place to ask, please point me in the right > direction. I'm a bit new to python, Qt, and pyQt.) > > I have data coming in over a pipe, and a text area where I display it. > I'd like the text area to be updated whenever data comes in over said pipe. > > I'm not sure how to do that... Is there a way to register fd's and > call-backs with the exec_loop() or something? > If there is documentation that addresses this, please point me to it; I > haven't found anything about this in my google'ing. You didn't say what operating system you were running. On unix, you can use QSocketNotifier for this. I don't know about Windows. -- Greg Green From eli.carter at inet.com Thu Apr 4 21:42:40 2002 From: eli.carter at inet.com (Eli) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] (newbie) async stuff References: <3CAC90E5.5070904@inet.com> <15532.38932.644553.951208@skorch.rt.cs.boeing.com> Message-ID: <3CACACAA.1060808@inet.com> Greg Green wrote: > Eli writes: > > (If this isn't the right place to ask, please point me in the right > > direction. I'm a bit new to python, Qt, and pyQt.) > > > > I have data coming in over a pipe, and a text area where I display it. > > I'd like the text area to be updated whenever data comes in over said pipe. > > > > I'm not sure how to do that... Is there a way to register fd's and > > call-backs with the exec_loop() or something? > > If there is documentation that addresses this, please point me to it; I > > haven't found anything about this in my google'ing. > > You didn't say what operating system you were running. On unix, you > can use QSocketNotifier for this. I don't know about Windows. > Oh, I'm running Linux. (Sorry, didn't think about that.) I'll look into QSocketNotifier; Thanks! Eli --------------------. "If it ain't broke now, Eli Carter \ it will be soon." -- crypto-gram eli.carter(a)inet.com `------------------------------------------------- From jgardn at alumni.washington.edu Fri Apr 5 00:51:42 2002 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] shaped windows and QWidget.setMask In-Reply-To: <200204041645.g34GjlOF008114@smtpzilla1.xs4all.nl>; from boud@valdyas.org on Thu, Apr 04, 2002 at 06:45:25PM -0100 References: <20020405011256.A25419@linux.hananet.net> <200204041645.g34GjlOF008114@smtpzilla1.xs4all.nl> Message-ID: <20020405080611.B496@linux.hananet.net> On Thu, Apr 04, 2002 at 06:45:25PM -0100, Boudewijn Rempt wrote: > On Thursday 04 April 2002 15:12, you wrote: > > I think QWidget.setMask is what you are looking for. I was interested in > > what it would take to do something with OpenGL and then using a mask, > > and this is it apparently. I haven't actually used it yet, but like all > > things Qt, I doubt there will be a problem. > > > > The same question was answered on Usenet, where I answered with > a working translation of that very example. However, since my > computer got fried, I lost that code. But it was very simple, and > a query on Google might even show the code. > It seems Google decided to throw away your attachment in the archives... I'm curious. The TuXeyes code uses some calls to X to figure out where the mouse is on the screen. Why did they do that? Can't they just call QCursor.position()? Jonathan From rwright at envisage-inc.com Fri Apr 5 19:50:39 2002 From: rwright at envisage-inc.com (Ruth Wright) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] How do you get WhatsThis stuff to work? Message-ID: <1018029000.29962.39.camel@host18.envisage-inc.com> I have a menubar which has a pixmap item that I'd like to connect a whatsthis() to. I've put the following in my code where menu bar is a QMenuBar(): id = menubar.insertItem(mypixmap) menubar.setWhatsThis(id,"my help text"); I thought that the documentation was telling me that hitting shift-f1 while that item had focus should pop up the little whatsthis window, but I get nothing. I'm running on linux, redhat 7.1 with python 2.1.1 and I think qt 3.0.1 (that seems to be what was installed, but I'm not sure). What else to I need to do? -- Ruth Wright Envisage Inc. phone: 325-0406 ext. 18 fax: 325-0409 From rwright at envisage-inc.com Fri Apr 5 20:48:15 2002 From: rwright at envisage-inc.com (Ruth Wright) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] ToolTips Message-ID: <1018032461.29962.49.camel@host18.envisage-inc.com> Having had no success with WhatsThis(), I decided to try ToolTips. So far so good, except that I can't seem to use setEnabled() to turn it on and off. I looked at the source distribution and as far as I can tell, it simply isn't there? I do see it for ToolTipGroups, though. Am I missing something? -- Ruth Wright Envisage Inc. From jbublitz at nwinternet.com Sat Apr 6 09:10:01 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyKDE2 for KDE3 In-Reply-To: <200204051000.MAA01392@mats.gmd.de> Message-ID: A few people have asked whether the KDE3.0beta2 version of PyKDE2 will work with KDE3.0final. The answer (just provided by attempt to compile under KDE3.0 final which I finally found, downloaded, and just got installed) is: NO. I also have the kdelibs source, so I'll be starting on a new release for KDE3.0 final in the morning. From just a quick look at the diffs for a couple of subdirectories I think I'll want to generate a complete version update, which takes anywhere from a couple of days to few weeks. In addition I have some stuff for gcc2.96 to work in and want to take another shot at improving the build and distribution system. The promised patch for gcc2.96 ran into some difficulties and I think I'll roll that into the next release as well. I'll probably have the next release ready about the time some of you finally find all of the libs you need to get KDE3.0 to work. :) Jim From phil at river-bank.demon.co.uk Sat Apr 6 19:33:27 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] ToolTips References: <1018032461.29962.49.camel@host18.envisage-inc.com> Message-ID: <3CAF3DFC.1AD4D4A0@river-bank.demon.co.uk> Ruth Wright wrote: > > Having had no success with WhatsThis(), I decided to try ToolTips. So > far so good, except that I can't seem to use setEnabled() to turn it on > and off. > I looked at the source distribution and as far as I can tell, it simply > isn't there? I do see it for ToolTipGroups, though. > Am I missing something? No, I am. They will be added for the next release (probably 3.1.1). Phil From phil at thekompany.com Sat Apr 6 19:38:31 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog Makefile NEWS qapplication.sip qcanvas.sip qdatetimeedit.sip qdesktopwidget.sip qerrormessage.sip qevent.sip qgl.sip qmenubar.sip qobject.sip qpeapplication.sip qsocket.sip qsqldatabase.sip qtable.sip qtooltip.sip" Message-ID: <20020406173854.492DE3FA53@valentine> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv21213 Modified Files: ChangeLog Makefile NEWS qapplication.sip qcanvas.sip qdatetimeedit.sip qdesktopwidget.sip qerrormessage.sip qevent.sip qgl.sip qmenubar.sip qobject.sip qpeapplication.sip qsocket.sip qsqldatabase.sip qtable.sip qtooltip.sip Log Message: Added the %ConvertToSubClassCode for QObject and all its sub-classes. Added the missing QToolTip.setEnabled() and QToolTip.enabled() methods. Fixed the build process so that the naming of the Qtopia package is more consistent with other packages. From phil at river-bank.demon.co.uk Sun Apr 7 00:05:08 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Segmentation falue on exit... caused by QLineEdit? References: <20020404200550.B26236@linux.hananet.net> Message-ID: <3CAF7D8F.B777A9B4@river-bank.demon.co.uk> Jonathan Gardner wrote: > > I am running with PyQt-3.1-Qt-2.3.1.tar.gz and sip-3.1.tar.gz on Qt > 2.3.1 (compiled from sources with threading) and Python 2.1.2 (with > threading but not gnu-pth.) > > My base system is Linux 2.4.18 with GNU C Library 2.2. > > I run the code below, and when it exits (by clicking on the exit button > - X Windows 4.2.0 with BlackBox), it causes a segmentation fault. Other > widgets besides the QLineEdit widget won't cause a segfault. (I have > tried QLabel and QPushButton.) > > Also, adding "del w" at the end after a.exec_loop() solves the problem. > > This is odd, because I thought I was running PyQt-3.1 and sip-3.1 > earlier with no problems at all. Of course, I have upgraded a lot of > things, so it is hard to tell what exactly changed. > > I read in an email from a long time ago that this was fixed in newer > versions. Has it popped its ugly head up again? Or am I just on a really > strange system? > > Jonathan > > THE CODE: > > import sys > from qt import * > > class my_widget(QWidget): > def __init__(self,parent = None,name = None,fl = 0): > QWidget.__init__(self,parent,name,fl) > self.input = QLineEdit(self) > > if __name__ == '__main__': > a = QApplication(sys.argv) > QObject.connect(a,SIGNAL('lastWindowClosed()'),a,SLOT('quit()')) > w = my_widget() > a.setMainWidget(w) > w.show() > a.exec_loop() > del w I've tried it with Qt 3.0.3 and 2.3.2 and don't get a seg fault. Phil From jgardn at alumni.washington.edu Sun Apr 7 02:38:58 2002 From: jgardn at alumni.washington.edu (Jonathan Gardner) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Segmentation falue on exit... caused by QLineEdit? In-Reply-To: <3CAF7D8F.B777A9B4@river-bank.demon.co.uk>; from phil@river-bank.demon.co.uk on Sat, Apr 06, 2002 at 11:58:23PM +0100 References: <20020404200550.B26236@linux.hananet.net> <3CAF7D8F.B777A9B4@river-bank.demon.co.uk> Message-ID: <20020407095337.B457@linux.hananet.net> On Sat, Apr 06, 2002 at 11:58:23PM +0100, Phil Thompson wrote: > > I've tried it with Qt 3.0.3 and 2.3.2 and don't get a seg fault. > Humm... Running the code after several days (and no changes to Qt) renders no errors. I'm started to think it had to do with QTDIR or LD_LIBRARY_PATH variables. So I screwed around with them. I set QTDIR to the old 2.3.2 directory, and I set LD_LIBRARY_PATH to the lib directory therein. The problem is that there is no problem. And I was so careful about actually making sure there was a problem when I first submitted this. =( Next time I go and install sip/PyQt, I'll take careful notes, see if it was something stupid I was doing (most likely true). And I'll remember to be more careful with the environmental variables for Qt. Jonathan From jbublitz at nwinternet.com Sun Apr 7 03:10:55 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Need user input! In-Reply-To: <200204061000.MAA19525@mats.gmd.de> Message-ID: I've just started on the next release of PyKDE2 and have decided to tackle the build system first, or at least in tandem with putting the rest of the release together. What I need to know is where the PyQt .sip files are located on your system, so I can tell configure where to look for them. Right now, I plan on searching the following: /usr/local/PyQt-3.0/sip /usr/local/src/PyQt-3.0/sip /usr/bin/src/PyQt-3.0/sip /usr/share/sip /usr/local/share/sip If your PyQt sip files are somewhere else, let me know so I can add that location to the configure search path. The easiest way to find the subdirectories is to do 'locate qobject.sip'. Also, I'll be switching to sip 3.1 for the next release, as it makes it much easier to accomplish some of things I want to do. Ideally, it should be possible to return to a single tarball for all versions, with a tarball about 20% the size of the current releases, and easier to distribute fixes and patches too. The downside is it will add 5 to 15 minutes to the build times, but recompiles (if needed for fixes) will be much shorter too. Jim From dts at iti-oh.com Sun Apr 7 20:21:02 2002 From: dts at iti-oh.com (Smith, Dave) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Official announcement of PyQt book Message-ID: <3DCF393159D8D3119C1C00508B62B9067062F9@ntmilford2.iti-oh.com> Is the source code for the example programs from the PyQt book and the PyQt unittestgui.py available for download? They don't seem to be on the CD that came with the book... Thanks! Dave -----Original Message----- From: Boudewijn Rempt [mailto:boud@valdyas.org] Sent: Monday, April 01, 2002 4:56 PM To: PyKDE Mailing List Subject: [PyKDE] Official announcement of PyQt book Well, I'd like to finally officially announce that my book, _GUI Programming with Python using the Qt Toolkit_ is now officially available on paper. Whew! You buy it directly from the publisher's website: http://www.opendocs.org, or, preferably, at your favourite local or on-line bookshop. For instance, Amazon lists it as: http://www.amazon.com/exec/obidos/ASIN/0970033044/qid=1017685892/sr=8-1/ref= sr_8 _1_1/103-3219259-3855046 (And I wonder how that's going to come across.) The ISBN is 0-97003300-4-4. Anyway, I've written about 160.000 words of English prose and code, all about Qt, PyQt, sip, Qt Designer and BlackAdder. I cover both Qt 2 and Qt 3 in a lot of detail. All source code to the examples is included on a cd-rom, and Opendocs will shortly open a webforum where I'll post updated code and where people can discuss problems. You can read the book online at: http://www.opendocspublishing.com/pyqt. -- Boudewijn Rempt | http://www.valdyas.org _______________________________________________ PyKDE mailing list PyKDE@mats.gmd.de http://mats.gmd.de/mailman/listinfo/pykde From Thorsten.Horstmann at web.de Sun Apr 7 20:44:56 2002 From: Thorsten.Horstmann at web.de (Thorsten Horstmann) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Need user input! References: Message-ID: <3CB0932C.73C602D5@web.de> Jim Bublitz wrote: > What I need to know is where the PyQt .sip files are located on > your system, so I can tell configure where to look for them. Right > now, I plan on searching the following: > > /usr/local/PyQt-3.0/sip > /usr/local/src/PyQt-3.0/sip > /usr/bin/src/PyQt-3.0/sip > /usr/share/sip > /usr/local/share/sip is it possible to tell the configure with an option where to search for the files? On my Solaris workstation I have mostly such files not in those 'standard' directories. -Thorsten From bsarempt at xs4all.nl Sun Apr 7 21:30:57 2002 From: bsarempt at xs4all.nl (Boudewijn Rempt) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Official announcement of PyQt book In-Reply-To: <3DCF393159D8D3119C1C00508B62B9067062F9@ntmilford2.iti-oh.com> Message-ID: On Sun, 7 Apr 2002, Smith, Dave wrote: > Is the source code for the example programs from the PyQt book > and the PyQt unittestgui.py available for download? > > They don't seem to be on the CD that came with the book... > They should be -- but I haven't checked the CD. (Didn't get the chance -- otherwise the stuff wouldn't have got on compressed. There's place enough for it. For now, get the quickly thrown-together package of the relevant scripts at: http://www.valdyas.org/~boud/unittest.tgz. (I hope that's all right, since I tarballed it fairly quickly. I'm going to check the CD-Rom as soon as I've got access to a computer with a CD-drive again.) From dts at iti-oh.com Sun Apr 7 22:38:16 2002 From: dts at iti-oh.com (Smith, Dave) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Official announcement of PyQt book Message-ID: <3DCF393159D8D3119C1C00508B62B9067062FA@ntmilford2.iti-oh.com> Boudewijn, Thanks! Unfortunately, I get an "Forbidden You don't have permission to access /~boud/unittest.tgz on this server." error accessing http://www.valdyas.org/~boud/unittest.tgz Can this be fixed or made available elsewhere? Here's a listing of what is on my CD, if the example code is hidden in one of these bundles (or if I am blind) please let me know. Great job on the book, BTW! Dave D:\>ls -R .: Python Ruby ./Python: Blackadder Python-2.2.tgz Windows rpms ./Python/Blackadder: Linux windows ./Python/Blackadder/Linux: BA-demo-1.0Beta3-1_tkc_slak80.i386.tar.gz Rpms BAPyQt-1.0Beta3_Py2.1-1_tkc_slak80.i386.tar.gz ./Python/Blackadder/Linux/Rpms: BA-demo-1.0Beta3-1_tkc.i386.rpm BAPyQt-demo-1.0Beta3_Py2.0-1_tkc.i386.rpm BAPyQt-demo-1.0Beta3_Py2.1-1_tkc.i386.rpm ./Python/Blackadder/windows: BlackAdder-Demo-1.0Beta3.exe PyQt-3.0-Qt-NC.exe ./Python/Windows: Python-2.2.exe ./Python/rpms: python2-2.2-2.i386.rpm python2-tools-2.2-2.i386.rpm python2-docs-2.2-2.i386.rpm ./Ruby: ruby-qt2-0.12.tar.gz rubypizza.tar D:\> -----Original Message----- From: Boudewijn Rempt [mailto:bsarempt@xs4all.nl] Sent: Sunday, April 07, 2002 3:30 PM To: Smith, Dave Cc: PyKDE Mailing List Subject: RE: [PyKDE] Official announcement of PyQt book On Sun, 7 Apr 2002, Smith, Dave wrote: > Is the source code for the example programs from the PyQt book > and the PyQt unittestgui.py available for download? > > They don't seem to be on the CD that came with the book... > They should be -- but I haven't checked the CD. (Didn't get the chance -- otherwise the stuff wouldn't have got on compressed. There's place enough for it. For now, get the quickly thrown-together package of the relevant scripts at: http://www.valdyas.org/~boud/unittest.tgz. (I hope that's all right, since I tarballed it fairly quickly. I'm going to check the CD-Rom as soon as I've got access to a computer with a CD-drive again.) From laz at strakt.com Mon Apr 8 15:42:37 2002 From: laz at strakt.com (Fredrik Juhlin) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Building PyQT without SGI style Message-ID: <20020408134233.GC21497@strakt.com> Hi! I'm trying to build PyQT but I'm running into trouble. I've come to the point where I can get it to compile, but when Python tries to import the module, I get the error "ImportError: /usr/local/lib/python2.2/site-packages/libqtcmodule.so: undefined symbol: qt_cast__9QSGIStylePCc". I'm building PyQT on a Debian machine and found that QT was indeed compiled without SGI style support. IS there any way to build PyQT so that it doesn't depend on the SGI style? //FJ From jbublitz at nwinternet.com Mon Apr 8 18:13:26 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Need user input! In-Reply-To: <200204081000.MAA06396@mats.gmd.de> Message-ID: On 08-Apr-02 Thorsten Horstmann wrote: > Jim Bublitz wrote: >> What I need to know is where the PyQt .sip files are located on >> your system, so I can tell configure where to look for them. >> Right now, I plan on searching the following: >> /usr/local/PyQt-3.0/sip >> /usr/local/src/PyQt-3.0/sip >> /usr/bin/src/PyQt-3.0/sip >> /usr/share/sip >> /usr/local/share/sip > is it possible to tell the configure with an option where to > search for the files? On my Solaris workstation I have mostly > such files not in those 'standard' directories. Yes - there will be a "--with-PyQt-sip=" option (or something similar) as well. I'll post info here and in the README when the release is ready. Based on other email, I'll probably be adding: ../PyQt-3.0/sip /usr/src/PyQt-3.0/sip The 'PyQt-3.0' will become 'PyQt-3.1' in the next release and the '3.1' will probably track the sip version number that 'sip -V' returns. I just want to cover most of the possibilities in the configure script, but there should be "--with" options for paths and versions. I'll make sure those are documented. Jim From greglandrum at mindspring.com Tue Apr 9 01:16:31 2002 From: greglandrum at mindspring.com (greg Landrum) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] designer, pyuic and QBoxLayout Message-ID: <5.1.0.14.2.20020408161618.03976e58@mail.earthlink.net> I've run across a problem with pyuic and designer which is either serious user error or a nasty bug in pyuic. I love these situations. :-) When setting up simple dialog boxes using BoxLayouts, the code generated by pyuic adds an extra QWidget that results in the guts of the dialog not resizing with the window. This widget (named LayoutWidget) is used as the parent of all objects in the main dialog. The net result is that resizing the dialog does not end up resizing the guts of the dialog. I've attached a sample .ui file (essentially a blank template for a dialog with buttons along the bottom from designer) and a patched up version of the output from pyuic to demonstrate the problem. I left all the original code from pyuic in there, I just commented out the bad bits. Is this a known problem or have I screwed up badly? In case it matters, I'm using PyQt 3.1rc2 under Linux. If this has been fixed in the actual release, I apologize and I'll upgrade immediately. -greg -------------- next part -------------- A non-text attachment was scrubbed... Name: simpledialog.ui Type: application/octet-stream Size: 3554 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020409/9eeedc52/simpledialog.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: simpledialog.py Type: application/octet-stream Size: 1739 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020409/9eeedc52/simpledialog-0001.obj From claustre at esrf.fr Tue Apr 9 08:43:14 2002 From: claustre at esrf.fr (Laurent Claustre) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] HP-UX 10.20 runtime error at installation of PyQt Message-ID: <3CB28D61.8060000@esrf.fr> Hi, With PyQt/sip 3.1rc1 on HP-UX 10.20 I've got something like this: Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) [GCC 2.95.2 19991024 (release)] on hp-uxB Type "copyright", "credits" or "license" for more information. >>> import qt Traceback (most recent call last): File "", line 1, in ? File "/segfs/bliss/depot/pythonesrf_5.0/hpux102/lib/python2.1/site-packages/qt.py", line 933, in ? libqtc.sipRegisterClasses() RuntimeError: Attempt to create a Python instance for a NULL pointer >>> Any ideas how to fix this? I am using qt-3.0.1, sip+PyQt 3.1rc1, everything freshly compiled with gcc-2.95.2. Regards, PS: i've seen such a request message from archive (august 2001) but without any response, so I try to get help form you ! -- /===============================================================\ | Laurent Claustre | eMail: claustre@esrf.fr | | BeamLine Instrument Software | Phone: +33 (0)476 88 29 12 | | Support Group (BLISS) | Fax : +33 (0)476 88 25 42 | | Experiments Division | Central Building Room 150 | | ------------------------------------------------------------- | | European Synchrotron Radiation Facility | | 6 rue Jules Horowitz BP220 38042 Grenoble Cedex - France | \===============================================================/ From greglandrum at earthlink.net Tue Apr 9 12:58:27 2002 From: greglandrum at earthlink.net (Greg Landrum) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] designer, pyuic and QBoxLayout Message-ID: <5.1.0.14.2.20020408153222.02c11fd0@mail.earthlink.net> I've run across a problem with pyuic and designer which is either serious user error or a nasty bug in pyuic. I love these situations. :-) When setting up simple dialog boxes using BoxLayouts, the code generated by pyuic adds an extra QWidget that results in the guts of the dialog not resizing with the window. This widget (named LayoutWidget) is used as the parent of all objects in the main dialog. The net result is that resizing the dialog does not end up resizing the guts of the dialog. I've attached a sample .ui file (essentially a blank template for a dialog with buttons along the bottom from designer) and a patched up version of the output from pyuic to demonstrate the problem. I left all the original code from pyuic in there, I just commented out the bad bits. Is this a known problem or have I screwed up badly? In case it matters, I'm using PyQt 3.1rc2 under Linux. If this has been fixed in the actual release, I apologize and I'll upgrade immediately. -greg -------------- next part -------------- A non-text attachment was scrubbed... Name: simpledialog.ui Type: application/octet-stream Size: 3554 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020409/66951549/simpledialog.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: simpledialog.py Type: application/octet-stream Size: 1739 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020409/66951549/simpledialog-0001.obj -------------- next part -------------- ---- greg Landrum (greglandrum@earthlink.net) Software Carpenter/Computational Chemist From robinsummerhill at cyantechnology.com Tue Apr 9 17:01:28 2002 From: robinsummerhill at cyantechnology.com (Robin Summerhill) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Win2000 - example PyQT scripts crash python interpreter Message-ID: <53355E40BBE8D411A8740002B30CEA570AAF0F@SERVER1> Hi, I'm new to Python (but not Qt). I'm looking at the possibility of using Python and PyQt as a scripting engine to embed in an application written in C++/Qt (targetting Win32 and Linux). I've built sip3.1 and PyQT-3.1-Qt-3.0.2 following the instructions to the letter, and everything seemed to go ok. These were built using: MSVC6 sp5 Qt 3.0.3 (commercial version - debug dll) Python2.2 (binary distribution from Python.org) The example scripts tut1 - 5 run ok. Tut6.py gives the following trace info and then crashes the interpreter: Traceback (most recent call last): File "tut6.py", line 38, in ? w = MyWidget() File "tut6.py", line 33, in __init__ LCDRange(grid) File "tut6.py", line 11, in __init__ QVBox.__init__(self,parent,name) File "c:\python22\lib\qt.py", line 121, in __init__ libqtc.sipCallCtor(8,self,args) RuntimeError: Underlying C/C++ object has been deleted Can anyone give me any info on why this might be happening? I've done the same thing on Linux and all the examples run fine. Thanks in advance. Robin Summerhilll robinsummerhill@cyantechnology.com From jjl at pobox.com Tue Apr 9 18:34:33 2002 From: jjl at pobox.com (John J. Lee) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] designer, pyuic and QBoxLayout In-Reply-To: <5.1.0.14.2.20020408161618.03976e58@mail.earthlink.net> Message-ID: On Mon, 8 Apr 2002, greg Landrum wrote: [...] > When setting up simple dialog boxes using BoxLayouts, the code generated by > pyuic adds an extra QWidget that results in the guts of the dialog not > resizing with the window. This widget (named LayoutWidget) is used as the > parent of all objects in the main dialog. The net result is that resizing > the dialog does not end up resizing the guts of the dialog. I vaguely remember that designer adds a top-level layout implicitly, or something, so that if you add another one you end up with too many layouts -- or something like that. Sorry for the vagueness, but if you think along those lines I think you'll find the problem. I had exactly the same problem as you, and tested that uic (the C++ output version of pyuic) does the same thing. Somebody on the qt list pointed out the problem to me, and though I don't think I ever got round to testing that that really was the problem, I think was confident at the time that it would work. Try searching the qt list for (the answer to) my post if you're still stuck. John From laurenceliew at yahoo.com.sg Wed Apr 10 02:06:28 2002 From: laurenceliew at yahoo.com.sg (Laurence Liew) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt 3.1: configure does not produce Makefile Message-ID: <1018397319.30008.10.camel@beowulf> Hi all.. I have just installed Python 2.2, QT 3.0.1. I tried to install PyQt 3.1 without success. I tried the usual ./configure make make install However, ./configure did not produce any Makefile. The last statement that configure produces is "configure: creating ./config.status" However configure also did not produce any config.status Any help would be appreciated. Laurence == [root@localhost PyQt-3.1]# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets ${MAKE}... yes checking for a BSD-compatible install... /usr/bin/install -c checking for g++... g++ checking for C++ compiler default output... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... none checking how to run the C++ preprocessor... g++ -E checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking dependency style of gcc... none checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for /usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking whether ln -s works... yes checking how to recognise dependant libraries... pass_all checking command to parse /usr/bin/nm -B output... ok checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking whether to build static libraries... no checking whether -lc should be explicitly linked in... no creating libtool checking for -fno-exceptions... yes checking for python... /usr/local/bin/python checking Python version... 2.2 checking for Python.h... /usr/local/include/python2.2 checking for lib-dynload... /usr/local/lib/python2.2 checking where Python modules will be installed... /usr/local/lib/python2.2/site-packages checking where Python C++ modules will be installed... /usr/local/lib/python2.2/site-packages checking for sip.h... /usr/local/include/python2.2 checking for SIP Python module library... -L/usr/local/lib/python2.2/site-packages -lsip checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking for moc... /usr/local/qt/bin/moc checking for qobject.h... /usr/local/qt/include checking for Qt library... -L/usr/local/qt/lib -lqt-mt checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for Qt version >= 302 and < 400... yes checking for Qt version >= 220... yes checking for Qt version >= 220... yes checking for the Qt Canvas module... yes checking for the Qt OpenGL module... yes checking for the Qt Network module... yes checking for the Qt Palmtop Environment module... no - qtpe module will not be built checking for the Qt SQL module... yes checking for the Qt Table module... yes checking for the Qt XML module... yes configure: creating ./config.status == end _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From greglandrum at mindspring.com Wed Apr 10 02:45:54 2002 From: greglandrum at mindspring.com (greg Landrum) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] designer, pyuic and QBoxLayout In-Reply-To: References: <5.1.0.14.2.20020408161618.03976e58@mail.earthlink.net> Message-ID: <5.1.0.14.2.20020409174128.02cbad88@mail.mindspring.com> At 09:34 AM 4/9/2002, John J. Lee wrote: >On Mon, 8 Apr 2002, greg Landrum wrote: >[...] > > When setting up simple dialog boxes using BoxLayouts, the code generated by > > pyuic adds an extra QWidget that results in the guts of the dialog not > > resizing with the window. This widget (named LayoutWidget) is used as the > > parent of all objects in the main dialog. The net result is that resizing > > the dialog does not end up resizing the guts of the dialog. > >I vaguely remember that designer adds a top-level layout implicitly, or >something, so that if you add another one you end up with too many layouts >-- or something like that. Sorry for the vagueness, but if you think >along those lines I think you'll find the problem. > >I had exactly the same problem as you, and tested that uic (the C++ output >version of pyuic) does the same thing. Somebody on the qt list pointed >out the problem to me, and though I don't think I ever got round to >testing that that really was the problem, I think was confident at the >time that it would work. Try searching the qt list for (the answer to) my >post if you're still stuck. I managed to find the message on the qt list and clear everything up. For those who come after us... The thread on the qt list is at URL: http://lists.trolltech.com/qt-interest/2002-01/thread00567-0.html The short summary is that I was building the layout wrong. What I was doing: selecting the widgets to go in the Layout and then hitting the layout button. What I should have been doing: selecting the container widget (notebook, window, whatever) and hitting the layout button. It's easy! (kind of... getting things to look right is non-trivial, but that always is). -greg From ejoy at peoplemail.com.cn Wed Apr 10 08:02:53 2002 From: ejoy at peoplemail.com.cn (ejoy) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] How can I use SIP to wrap STL class? Message-ID: <200204100602.IAA23915@mail.gmd.de> Hi all: I've read sip tutorial on internet and I know how to wrap a int foo(float); But I still have problem to wrap the following code snippet: #include #include using namespace std; class A{ public: void foo(const vector& input,vector& output); }; I want to wrap it in this way: python: in = ['a','b','c'] out = [] A.foo(in,out) and the out should look like:['c','b','a'] How can I do this using SIP. BTW: the sip document link on google seems broken.Where can I found it? -- Sincerely yours, ejoy From r.hogendoorn at hitt.nl Wed Apr 10 16:34:47 2002 From: r.hogendoorn at hitt.nl (Hogendoorn, Rene) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Returning real python type through "child()" function? Message-ID: <8C6ADF4772B7D511A3E40008C7BB878A15985B@chopin.hitt.nl> I want to use a validator for the (internal) QLineEdit of the QListViewItem class during renaming, i.e. I want to control the renaming process. Currently, no direct APIs are exposed in Qt. The only way is to subclass QListViewItem and to get the QLineEdit via the child() function of the encapsulating listview class (it is the "qt_renamebox" child). Unfortunately, this only works in C++, since, there, you can dynamic_cast the returned QObject. In python, you are stuck with the virtually useless QObject. In PyQt, the necessary information to return to real type is available. I.e. the type of the child can be derived from the metaobject information; so, in principle, a python object of the proper type could be returned. Any thoughts about this? Regards, Ren? Hogendoorn -- HITT Holland Institute of Traffic Technology B.V. Oude Apeldoornseweg 41-45, P.O.-Box 717, NL-7300AS, Apeldoorn. Tel.( +31) 55 543 2594, Fax. (+31) 55 543 2553. E-mail: r.hogendoorn@hitt.nl From robinsummerhill at cyantechnology.com Wed Apr 10 17:18:52 2002 From: robinsummerhill at cyantechnology.com (Robin Summerhill) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python Message-ID: <53355E40BBE8D411A8740002B30CEA570AAF12@SERVER1> Hi, I'm embedding PyQT in a C++ application and am trying to extend the interpreter with my app's object model. I know I need to do something like the following to pass a C++-created widget to Python: #include #include #include static PyObject *py_getWidget(PyObject *self, PyObject *args) { PyObject* p = sipMapCppToSelf(reinterpret_cast(pWidget), sipClass_QWidget); return p; } However, when I try to link this (MSVC6 with SP5) I get: error LNK2001: unresolved external symbol "struct _object * sipClass_QWidget" (?sipClass_QWidget@@3PAU_object@@A) I'm linking against libsip.lib and libqtc.lib. Looking at the exports from libqtc.lib with dumpbin, sipClass_QWidget is present and correct with the right mangled name. Other symbols such as sipQWidget *are* accessible. I'm probably doing something really stupid but I can't see it. Can anyone give me any insight or send my some example code that works? Thanks, Robin Summerhill robinsummerhill@cyantechnology.com From jbublitz at nwinternet.com Wed Apr 10 18:41:59 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: How can I use SIP to wrap STL class? In-Reply-To: <200204101000.MAA14141@mats.gmd.de> Message-ID: On 10-Apr-02 ejoy wrote: >I've read sip tutorial on internet and I know how to wrap a > int foo(float); > But I still have problem to wrap the following code snippet: >#include >#include > using namespace std; > class A{ > public: > void foo(const vector& input,vector& > output); > }; > I want to wrap it in this way: > python: > in = ['a','b','c'] > out = [] > A.foo(in,out) > and the out should look like:['c','b','a'] > How can I do this using SIP. The simplest way would be to used %MappedTypes. Also, if you have control of the C++ code, it would be easier to do: ListType foo (ListType) in your class and then out = foo (in) in your Python code. In either PyQt or PyKDE2, grep for %MappedType - there are a number of examples that do the QList type, which would be very similar (kprocesslist.sip is one example which is very similar). The %MappedType construct provides two "methods" - one for converting from Python to C++ and the other for converting C++ to Python. I'm not that familiar with using the STL, but your %MappedType should look something like: %MappedType ListType { %HeaderCode #include // for vector and string types ?? typedef std::vector ListType; // this is probably close // but might not be //correct %End %ConvertFromTypeCode %End %ConvertToTypeCode %End }; If you can't modify the C++ code to return a Python list, you will need to write %MemberCode (following foo's declaration in the .sip file) to accomplish that (I'm sure Phil will correct me if I'm wrong). "ListType" can be any name you choose. "sipCpp" and "sipCppPtr" in the PyQt/PyKDE2 examples are the pointers that represent the data to and from C++ respectively - use those names. Documentation for the required Python functions is in the "Python C API" docs that usually come with a Python distribution. Py_BuildValue (if you need it - probably won't in this example) is documented in "Extending/Embedding Python" docs, also in a typical distribution. The section in Mark Lutz' "Programming Python" (O'Reilly) on embedding Python might also be helpful for examples of passing values between Python and C/C++. Jim From chris_burn at bigfoot.com Thu Apr 11 10:53:09 2002 From: chris_burn at bigfoot.com (Chris Burn) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Help getting started with applets Message-ID: <02Apr11.185925est.115203@gateway.al.com.au> Hi, I've just got PyQt and PyKDE built and it all looks good. I want to write a panel applet but I don't know how to get started. I know how in C from the tutorial : http://developer.kde.org/documentation/tutorials/dot/panel-applets.html but I can't think how to do this with PyKDE and I can't find any docs/tutorials/examples for applets. Could anyone give me some pointers? Perhaps port the first hello world example from the link to pyKDE? That would be great. Thanks Chris From LRoundy at ebuilt.com Thu Apr 11 11:36:05 2002 From: LRoundy at ebuilt.com (Roundy, Lance) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt on Win2000 Message-ID: <8436977D43BBD511A310009027F63CC50ED076@raptor> I'm interested in trying PyQt out. I've installed the Non-Commercial version of Qt as well as the associated PyQt module. All the installs seemed to go fine. However my initial attempt to import qt results in... >>> from qt import * Traceback (most recent call last): File "", line 1, in ? from qt import * File "D:\Program Files\Python22\lib\qt.py", line 46, in ? import libsip ImportError: DLL load failed: The specified module could not be found. >From what I read PyQt included the SIP module but all I can find on my system is libsip.dll under the Python 2.2 libs directory. Any direction on how I might further troubleshoot/correct the problem would be appreciated. Please reply directly as I'm not yet a member of the mailing list. Thanks! Lance From mickey at tm.informatik.uni-frankfurt.de Thu Apr 11 12:03:25 2002 From: mickey at tm.informatik.uni-frankfurt.de (Michael Lauer) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt on Win2000 In-Reply-To: <8436977D43BBD511A310009027F63CC50ED076@raptor> References: <8436977D43BBD511A310009027F63CC50ED076@raptor> Message-ID: <1018519257.32126.5.camel@gandalf.tm.informatik.uni-frankfurt.de> Am Don, 2002-04-11 um 02.09 schrieb Roundy, Lance: > I'm interested in trying PyQt out. I've installed the Non-Commercial > version of Qt as well as the associated PyQt module. All the installs > seemed to go fine. However my initial attempt to import qt results in... > > >>> from qt import * > Traceback (most recent call last): > File "", line 1, in ? > from qt import * > File "D:\Program Files\Python22\lib\qt.py", line 46, in ? > import libsip > ImportError: DLL load failed: The specified module could not be found. > > >From what I read PyQt included the SIP module but all I can find on my > system is libsip.dll under the Python 2.2 libs directory. copy libsip.dll to /system32 -- :M: -- |----------------------------------------------------------------------------| | Dipl.-Inf. Michael 'Mickey' Lauer mickey@tm.informatik.uni-frankfurt.de | | Raum 10b - ++49 69 798 28358 Fachbereich Informatik und Biologie | |----------------------------------------------------------------------------| From pef at fluent.com Thu Apr 11 16:27:31 2002 From: pef at fluent.com (Paul Felix) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt 3.1, Win2000, and MSVC runtime library Message-ID: <3CB59D30.8767CBFE@fluent.com> Hi, I want to pass on a fix I made to the Windows build of PyQt/Sip 3.1 using MS VC++. My build configuration is as follows: NT 4.0 SP 5 VC++ 6.0 SP 5 PyQt/Sip 3.1 Qt 3.0.3 Python 2.2.0 After building PyQt, I was able to run the PyQt examples on my NT 4.0 box, but when I ran the examples on a Win2000 box, they crashed at various times (most often when exiting the app). Here is the Win2000 configuration I tested: Windows 2000 Professional 5.0.2195 SP 2 While investigating, I noticed that the build was mixing static (MT) and DLL (MD) versions of the C runtime library: Package C runtime option ------- ---------------- Python -MD Qt -MD PyQt/Sip -MT This is a no-no according to our friends at Microsoft: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_.2f.md.2c_2f.ml.2c_2f.mt.2c_2f.ld.asp I went back to the PyQt/Sip build and changed the Makefile.win32-msvc files, replacing -MT with -MD. Now the examples run fine for me on both NT 4.0 and Win2000. This is a head scratcher, because I know some of you are running on Win2000 without problems -- maybe you made this fix too. Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: pef.vcf Type: text/x-vcard Size: 241 bytes Desc: Card for Paul Felix Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020411/d9c1198f/pef.vcf From greglandrum at mindspring.com Thu Apr 11 17:58:58 2002 From: greglandrum at mindspring.com (greg Landrum) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt 3.1, Win2000, and MSVC runtime library In-Reply-To: <3CB59D30.8767CBFE@fluent.com> Message-ID: <5.1.0.14.2.20020411085814.02d99248@mail.mindspring.com> Wow! This cleared up all the problems I was having with PyQt. Thanks Paul! -greg At 07:26 AM 4/11/2002, Paul Felix wrote: >Hi, > >I want to pass on a fix I made to the Windows build of PyQt/Sip 3.1 using >MS VC++. > >My build configuration is as follows: > > NT 4.0 SP 5 > VC++ 6.0 SP 5 > PyQt/Sip 3.1 > Qt 3.0.3 > Python 2.2.0 > >After building PyQt, I was able to run the PyQt examples on my NT 4.0 box, but >when I ran the examples on a Win2000 box, they crashed at various times (most >often when exiting the app). Here is the Win2000 configuration I tested: > > Windows 2000 Professional > 5.0.2195 SP 2 > >While investigating, I noticed that the build was mixing static (MT) and DLL >(MD) versions of the C runtime library: > > Package C runtime option > ------- ---------------- > Python -MD > Qt -MD > PyQt/Sip -MT > >This is a no-no according to our friends at Microsoft: > >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_.2f.md.2c_2f.ml.2c_2f.mt.2c_2f.ld.asp > >I went back to the PyQt/Sip build and changed the Makefile.win32-msvc files, >replacing -MT with -MD. Now the examples run fine for me on both NT 4.0 and >Win2000. > >This is a head scratcher, because I know some of you are running on Win2000 >without problems -- maybe you made this fix too. > >Paul From jbublitz at nwinternet.com Thu Apr 11 18:42:52 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: Help getting started with applets In-Reply-To: <200204111000.MAA00494@mats.gmd.de> Message-ID: On 11-Apr-02 Chris Burn wrote: > Hi, I've just got PyQt and PyKDE built and it all looks good. > I want to write a panel applet but I don't know how to get > started. I know how in C from the tutorial : > http://developer.kde.org/documentation/tutorials/dot/panel-applets > .html > but I can't think how to do this with PyKDE and I can't find any > docs/tutorials/examples for applets. > Could anyone give me some pointers? Perhaps port the first hello > world example from the link to pyKDE? That would be great. Basically everything you need is already in PyKDE2, but there are two nasty problems to overcome: 1. You need to embed the Python interpreter into your application for this to run (something has to run the Python code) 2. You need to create a .so library so KDE can load your applet. Without going into a lot of detail at the moment, the way I'd approach this (since I've already done something similar and know it works) is: a. Build a .so lib that embeds the Python interpreter (which is a static lib) - I have this done but the build process is very specific to my setup at the moment, so I can't distribute it easily. b. Create a .so library following the tutorial steps for loading your applet, but expand the 'init' function to load the Python interpreter .so as a plugin. I haven't looked at this very closely, but if the QString (configFile) that's passed in will support it, it should be possible to create a mechanism which will allow loading any Python applet via a single general .so lib, which I can put together and distribute with PyKDE2. There are pretty much two options: you can pursue this yourself, in which case contact me directly and I'll try and provide some code to get you started, or I'll get to this but it will take some time. I'm just getting ready to start doing my tax return, so the next 4 days are shot, and I've also started on the PyKDE2 release for KDE3.0 final. I can try and put something together in 2 or 3 weeks, since I have most of the pieces already. Getting the automake/autoconfig stuff setup is the hardest part. Another possible approach is to write the applet .so as in the the tutorial, and have it exec Python with command line args that load your app, but I haven't tried this. Jim From geiseri at yahoo.com Thu Apr 11 18:52:37 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: Help getting started with applets In-Reply-To: References: Message-ID: <200204111252.45488.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 We are actually talking about this in KDE. The current plan is to make a wrapper KPart and Kicker applet that will load PyKDE applets... I am not sure what the progress on this is. I can crank out a kicker applet in about 5 min, the hard part would be loading the pyqt code. is anyone here an embedding expert that would want to attack at least kicker applets with me first? if we can do a kicker applet any kpart would be trivial. - -ian reinhart geiser On Thursday 11 April 2002 01:30 pm, Jim Bublitz wrote: > On 11-Apr-02 Chris Burn wrote: > > Hi, I've just got PyQt and PyKDE built and it all looks good. > > I want to write a panel applet but I don't know how to get > > started. I know how in C from the tutorial : > > http://developer.kde.org/documentation/tutorials/dot/panel-applets > > .html > > but I can't think how to do this with PyKDE and I can't find any > > docs/tutorials/examples for applets. > > > > Could anyone give me some pointers? Perhaps port the first hello > > world example from the link to pyKDE? That would be great. > > Basically everything you need is already in PyKDE2, but there are > two nasty problems to overcome: 1. You need to embed the Python > interpreter into your application for this to run (something has to > run the Python code) 2. You need to create a .so library so KDE can > load your applet. > > Without going into a lot of detail at the moment, the way I'd > approach this (since I've already done something similar and know > it works) is: > > a. Build a .so lib that embeds the Python interpreter (which is a > static lib) - I have this done but the build process is very > specific to my setup at the moment, so I can't distribute it easily. > > b. Create a .so library following the tutorial steps for loading > your applet, but expand the 'init' function to load the Python > interpreter .so as a plugin. > > I haven't looked at this very closely, but if the QString > (configFile) that's passed in will support it, it should be > possible to create a mechanism which will allow loading any Python > applet via a single general .so lib, which I can put together and > distribute with PyKDE2. > > There are pretty much two options: you can pursue this yourself, in > which case contact me directly and I'll try and provide some code > to get you started, or I'll get to this but it will take some time. > I'm just getting ready to start doing my tax return, so the next 4 > days are shot, and I've also started on the PyKDE2 release for > KDE3.0 final. I can try and put something together in 2 or 3 weeks, > since I have most of the pieces already. Getting the > automake/autoconfig stuff setup is the hardest part. > > Another possible approach is to write the applet .so as in the the > tutorial, and have it exec Python with command line args that load > your app, but I haven't tried this. > > Jim > > > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8tb9dPy62TRm8dvgRAg+UAJ4tAs7kBDPpDLu1Z94Ypn4xLJ1BxACdFZ6l rJsxkWvwsEWo4teLET6ccP0= =KbVr -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From jbublitz at nwinternet.com Thu Apr 11 23:13:09 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: Help getting started with applets In-Reply-To: <200204111252.45488.geiseri@yahoo.com> Message-ID: On 11-Apr-02 ian reinhart geiser wrote: > We are actually talking about this in KDE. The current plan is > to make a wrapper KPart and Kicker applet that will load PyKDE > applets... That's pretty much what I was getting at. > I am not sure what the progress on this is. > I can crank out a kicker applet in about 5 min, the hard part > would be loading the pyqt code. is anyone here an embedding > expert that would want to attack at least kicker applets with > me first? Loading PyQt or PyKDE2 code just requires a Python 'import' statement in the script you want to run. You'd want to load Python scripts - not PyQt or PyKDE2 code especially. It's not necessary for the KPart/applet to know anything about PyQt or PyKDE2. You could probably write applets with Tk, PyGTK or wxWindows too - I assume applets have their own event loop, which is the only major consideration I can think of. > if we can do a kicker applet any kpart would be trivial. I already have a working KPart, so the kicker applet won't be a lot of work. I just need to find the time to write it up. As far as I can see, KDE already has all the necessary machinery to implement this except the Python specific stuff. There are some potential problems (concurrency), but probably nothing major. Jim From boud at valdyas.org Thu Apr 11 23:37:32 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Source for GUI Programming with Python Using the Qt Toolkit Message-ID: <200204112335.59390.boud@valdyas.org> I've cleaned up the source code for all the examples in the book, and ported it to PyQt 3.1. While awaiting the Opendocs webforum for the book, I've put up the packages on my own webserver. http://www.xs4all.nl/~bsarempt/python/pyqt_qt2.tgz Source for Python 1.x, 2.x, Qt 2.x, 3.x and PyQt 2.x. (Grab this if you use the PyQt that comes with your Linux distribution.) http://www.xs4all.nl/~bsarempt/python/pyqt_qt2.tgz Source for Python 2.x, Qt 3.x and PyQt 3.x. (Grab this if you're current with the PyQt from http://www.riverbankcomputing.co.uk The book can be read online at: http://www.opendocspublishing.com/pyqt Or bought, for instance from Amazon: http://www.amazon.com/exec/obidos/ASIN/0970033044/qid=1016980570/sr=8-1/ref=sr_8_1_1/102-2842252-0596931 -- Boudewijn Rempt | http://www.valdyas.org From geiseri at yahoo.com Fri Apr 12 05:21:04 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Building My Own Bindings Message-ID: <200204112321.09323.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Greetings I have been working on wraping some of my own qt derived widgets with sip and I have run into a wall on windows. I have generated bindings that work perfectly on linux, but for some reason when I try to run it on windows it crashes horribly with no other error than : Unhandled exception in python.exe (QT-MT302.DLL) 0xC0000005 Access Violation. Unfortunatly windows has no concept of debugging so I cannot even get something like a backtrace. The example PyQT applications work, and my non qt classes i created bindings with work perfectly. Could anyone offer any insight on this? Is PyQt even ment to be extended, or am i going about this the wrong way? I checked out the created dll and the imports looked good, I also compiled it with SIP_USE_DLL and linked in libqtc.lib. As an added bonus I also checked for undefined symbols and found none... TIA - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8tlKlPy62TRm8dvgRAqO5AKDrmqcK5NbxRlL7t0Evtw0wrdonEACfcgCT 80bTlP08IvEDpbur1sd1Mtw= =kbr2 -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From geiseri at yahoo.com Fri Apr 12 12:26:38 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt 3.1, Win2000, and MSVC runtime library In-Reply-To: <5.1.0.14.2.20020411085814.02d99248@mail.mindspring.com> References: <5.1.0.14.2.20020411085814.02d99248@mail.mindspring.com> Message-ID: <200204120626.47291.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Now this is quite odd. I am haveing a nightmare of building my own bindings here in PyQt. My Qt is built as MD My PyQt/SIP is built as MT and my bindings are built as MT What is funny is my normal PyQt scripts work perfectly, and my own bindings that use just sip work perfectly. It is only my Qt based bindings that I built that bork.... Since I installed my python win the installer from their site I am not sure what there setup it. I guess I am going to assume it was built with MT only because my plain SIP bindings work perfectly. I looked at the link and it only sounds like you cannot use both in the same project. I dunno though, I am a Mac/Unix programmer so most of the things here winders does is just plain silly. - -ian reinhart geiser On Thursday 11 April 2002 11:58 am, greg Landrum wrote: > Wow! This cleared up all the problems I was having with PyQt. Thanks > Paul! > > -greg > > At 07:26 AM 4/11/2002, Paul Felix wrote: > >Hi, > > > >I want to pass on a fix I made to the Windows build of PyQt/Sip 3.1 using > >MS VC++. > > > >My build configuration is as follows: > > > > NT 4.0 SP 5 > > VC++ 6.0 SP 5 > > PyQt/Sip 3.1 > > Qt 3.0.3 > > Python 2.2.0 > > > >After building PyQt, I was able to run the PyQt examples on my NT 4.0 box, > > but when I ran the examples on a Win2000 box, they crashed at various > > times (most often when exiting the app). Here is the Win2000 > > configuration I tested: > > > > Windows 2000 Professional > > 5.0.2195 SP 2 > > > >While investigating, I noticed that the build was mixing static (MT) and > > DLL (MD) versions of the C runtime library: > > > > Package C runtime option > > ------- ---------------- > > Python -MD > > Qt -MD > > PyQt/Sip -MT > > > >This is a no-no according to our friends at Microsoft: > > > >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/ > >HTML/_core_.2f.md.2c_2f.ml.2c_2f.mt.2c_2f.ld.asp > > > >I went back to the PyQt/Sip build and changed the Makefile.win32-msvc > > files, replacing -MT with -MD. Now the examples run fine for me on both > > NT 4.0 and Win2000. > > > >This is a head scratcher, because I know some of you are running on > > Win2000 without problems -- maybe you made this fix too. > > > >Paul > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8trZnPy62TRm8dvgRAp+CAKCqAjA63RbvtIXxDmCLkboejSzCkgCfSgz6 m64AdGzW+e/0Dz5KLTcfGSg= =mwlP -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From boud at valdyas.org Fri Apr 12 13:10:26 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Using QThread and qApp.lock Message-ID: <200204121308.53727.boud@valdyas.org> Janez Jere mailed me the other day about using threading in PyQt, and I found that I couldn't get a working solution myself. First, qApp.lock() or qApp.unlock() always seems to segfault. Without locking the application, one shouldn't call methods on QWidgets, of course, so that will lead to a segfault, too. Finally, when I run the script without locking, without accessing the GUI, I can get a working run, sometimes. Look at the result of running thread2.py three times: boud@calcifer:~> python thread2.py 0 0 1 1 2 2 3 3 4 4 Fatal Python error: PyEval_RestoreThread: NULL tstate Aborted boud@calcifer:~> 5 5 6 boud@calcifer:~> python thread2.py 0 0 Fatal Python error: PyThreadState_Get: no current thread Fatal Python error: PyThreadState_Get: no current thread Aborted boud@calcifer:~> python thread2.py 0 0 Fatal Python error: PyThreadState_Get: no current thread Aborted (The first run I pressed ctrl-c to end it.) -- Boudewijn Rempt | http://www.valdyas.org From boud at valdyas.org Fri Apr 12 13:13:40 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Using QThread and qApp.lock In-Reply-To: <200204121308.53727.boud@valdyas.org> References: <200204121308.53727.boud@valdyas.org> Message-ID: <200204121312.13888.boud@valdyas.org> On Friday 12 April 2002 13:08, Boudewijn Rempt wrote: > Janez Jere mailed me the other day about using threading in PyQt, and I > found that I couldn't get a working solution myself. > Of course, actually attaching the scripts is an idea... -- Boudewijn Rempt | http://www.valdyas.org -------------- next part -------------- A non-text attachment was scrubbed... Name: thread2.py Type: text/x-python Size: 1505 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020412/0b226894/thread2.py -------------- next part -------------- A non-text attachment was scrubbed... Name: thread.py Type: text/x-python Size: 1475 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020412/0b226894/thread.py From aleax at aleax.it Fri Apr 12 14:29:06 2002 From: aleax at aleax.it (Alex Martelli) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] book sources for PyQt 3? In-Reply-To: <200204121000.MAA15431@mats.gmd.de> References: <200204121000.MAA15431@mats.gmd.de> Message-ID: <200204121229.OAA10070@mail.gmd.de> Boudewijn Rempt writes: ... """ I've cleaned up the source code for all the examples in the book, and ported it to PyQt 3.1. While awaiting the Opendocs webforum for the book, I've put up the packages on my own webserver. http://www.xs4all.nl/~bsarempt/python/pyqt_qt2.tgz Source for Python 1.x, 2.x, Qt 2.x, 3.x and PyQt 2.x. (Grab this if you use the PyQt that comes with your Linux distribution.) http://www.xs4all.nl/~bsarempt/python/pyqt_qt2.tgz Source for Python 2.x, Qt 3.x and PyQt 3.x. (Grab this if you're current with the PyQt from http://www.riverbankcomputing.co.uk """ These are 2 copies of the same URL -- is there one I should get for "everything at the very latest release"? Thanks! Alex From rwright at envisage-inc.com Fri Apr 12 18:24:40 2002 From: rwright at envisage-inc.com (Ruth Wright) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] QTable programmatic selection Message-ID: <1018628645.1151.0.camel@host18.envisage-inc.com> I'm probably just being dense, but I cannot figure out how to programmatically set the selection of a table. I have a table in one window, and I'm trying to create a new window which is a copy of the old one. I'd like to have anything selected in the original window be selected in the new one. I'm running on linux, with pyqt version 3.1 My table is an 11 column table and is set with a selectionMode of QTable.SingleRow Here's what I've done: (I'm using PyQt, so pure Qt users bear with me) After checking that something is indeed selected, I get the current selection of the original table using: orig_selection = OrigTable.selection(OrigTable.currentSelection()); row = orig_selection.anchorRow(); This seems to be ok, since the row value it is gettings seems to match what I would expect. I then create a QTableSelection and set it using: new_selection = QTableSelection(); new_selection.init(row,0); new_selection.expandTo(row,10); new_selection.isActive() here is returning a 1 ret_val = NewTable.addSelection(newSelection); ret_val gets set here to 0 NewTable.currentSelection() returns a -1 test_selection = NewTable.selection(ret_val) seems valid test_selection.anchorRow() returns the same row as my original "row" value. Is there anything fundamentally wrong with this? Is it not possible to set a selection so that currentSelection() will return something? I'd appreciate any pointers! Ruth Wright Envisage Inc. From JKaercher at bruker-axs.com Fri Apr 12 22:47:49 2002 From: JKaercher at bruker-axs.com (Kaercher, Joerg) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Program crash using QCanvasRectangle Message-ID: <1674EE9F0613D3119BB80008C79FDB560114B02B@SAX_NTEX> Hi, I have installed PyQt-3.0 (patch level 4; Qt 3.0.3; MS Visual Studio 6) under Windows 2K. Using the QCanvas classes I discovered that calling the brush() method in QCanvasRectangle causes the whole application to crash. Here is an example program: import qt import qtcanvas import sys a=qt.QApplication(sys.argv) c=qtcanvas.QCanvas(256,256) v=qtcanvas.QCanvasView(c) list=[] for n in range(0,100,10): list.append(qtcanvas.QCanvasRectangle(10+n,10+n,50,50,c)) print 'pen()' print list[-1].pen() print 'brush()' print list[-1].brush() print 'show()' list[-1].show() a.setMainWidget(v) v.show() a.exec_loop() Did anybody else have the same problem? Joerg From geiseri at yahoo.com Fri Apr 12 23:10:00 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Program crash using QCanvasRectangle In-Reply-To: <1674EE9F0613D3119BB80008C79FDB560114B02B@SAX_NTEX> References: <1674EE9F0613D3119BB80008C79FDB560114B02B@SAX_NTEX> Message-ID: <200204121710.08903.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have found PyQt is very unstable for windows, you have to really make sure that Python, libsip, Qt and pyqt are all compiled with the same options. I spent a good part of a week hacking arround here but now I have everything working. I get a few crashes in libsip every so often, but I am still using Pre2 of everything since it is such a pain to try to install it. I have noticed though that if you use anything that relates to libqtc.lib you run into problems real fast. I am wondering if there are a few unexported symbols that are causeing runtime problems. Considering I fought for over a week just to get my own QDialog derived class to work on windows, I would not be surprised if some more research needs to go into the libqtc.dll... Meanwhile check to see that python, libsip and qt are all compiled with -MD in the cl line. This fixed most of my problems. - -ian reinhart geiser On Friday 12 April 2002 04:46 pm, Kaercher, Joerg wrote: > Hi, > > I have installed PyQt-3.0 (patch level 4; Qt 3.0.3; MS Visual Studio 6) > under Windows 2K. Using the QCanvas classes I discovered that calling the > brush() method in QCanvasRectangle causes the whole application to crash. > Here is an example program: > > import qt > import qtcanvas > import sys > > a=qt.QApplication(sys.argv) > > c=qtcanvas.QCanvas(256,256) > v=qtcanvas.QCanvasView(c) > > list=[] > for n in range(0,100,10): > list.append(qtcanvas.QCanvasRectangle(10+n,10+n,50,50,c)) > print 'pen()' > print list[-1].pen() > print 'brush()' > print list[-1].brush() > print 'show()' > list[-1].show() > > a.setMainWidget(v) > v.show() > a.exec_loop() > > Did anybody else have the same problem? > > Joerg > > > > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8t00wPy62TRm8dvgRApWjAKDXdoq1iMsKRkLrfBdiRXa3ERD4XwCglVSJ HLGoGZT8jFXqdisXR9FxLGQ= =lvnZ -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From phil at river-bank.demon.co.uk Sat Apr 13 12:38:50 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Returning real python type through "child()" function? References: <8C6ADF4772B7D511A3E40008C7BB878A15985B@chopin.hitt.nl> Message-ID: <3CB8093A.3018EBDC@river-bank.demon.co.uk> "Hogendoorn, Rene" wrote: > > I want to use a validator for the (internal) QLineEdit of the QListViewItem > class during renaming, > i.e. I want to control the renaming process. > Currently, no direct APIs are exposed in Qt. The only way is to subclass > QListViewItem and to > get the QLineEdit via the child() function of the encapsulating listview > class (it is the "qt_renamebox" child). > Unfortunately, this only works in C++, since, there, you can dynamic_cast > the returned QObject. > In python, you are stuck with the virtually useless QObject. > > In PyQt, the necessary information to return to real type is available. I.e. > the type of the child can be > derived from the metaobject information; so, in principle, a python object > of the proper type could be > returned. > Any thoughts about this? The current CVS version should do what you want. The support was added to help factory classes and plugins. Phil From phil at river-bank.demon.co.uk Sat Apr 13 12:39:22 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt on Win2000 References: <8436977D43BBD511A310009027F63CC50ED076@raptor> <1018519257.32126.5.camel@gandalf.tm.informatik.uni-frankfurt.de> Message-ID: <3CB8094E.D41BEA14@river-bank.demon.co.uk> Michael Lauer wrote: > > Am Don, 2002-04-11 um 02.09 schrieb Roundy, Lance: > > I'm interested in trying PyQt out. I've installed the Non-Commercial > > version of Qt as well as the associated PyQt module. All the installs > > seemed to go fine. However my initial attempt to import qt results in... > > > > >>> from qt import * > > Traceback (most recent call last): > > File "", line 1, in ? > > from qt import * > > File "D:\Program Files\Python22\lib\qt.py", line 46, in ? > > import libsip > > ImportError: DLL load failed: The specified module could not be found. > > > > >From what I read PyQt included the SIP module but all I can find on my > > system is libsip.dll under the Python 2.2 libs directory. Which is correct. What is your sys.path? > copy libsip.dll to /system32 This shouldn't be necessary. Phil From phil at river-bank.demon.co.uk Sat Apr 13 12:39:53 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] HP-UX 10.20 runtime error at installation of PyQt References: <3CB28D61.8060000@esrf.fr> Message-ID: <3CB8096A.262F02BE@river-bank.demon.co.uk> Laurent Claustre wrote: > > Hi, > With PyQt/sip 3.1rc1 on HP-UX 10.20 I've got something like this: > > Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) > [GCC 2.95.2 19991024 (release)] on hp-uxB > Type "copyright", "credits" or "license" for more information. > >>> import qt > Traceback (most recent call last): > File "", line 1, in ? > File "/segfs/bliss/depot/pythonesrf_5.0/hpux102/lib/python2.1/site-packages/qt.py", line 933, in ? > libqtc.sipRegisterClasses() > RuntimeError: Attempt to create a Python instance for a NULL pointer > >>> > > Any ideas how to fix this? > I am using qt-3.0.1, sip+PyQt 3.1rc1, everything freshly compiled with > gcc-2.95.2. > > Regards, > > PS: i've seen such a request message from archive (august 2001) but without any response, so I > try to get help form you ! Try upgrading to the final release of 3.1. There was a SIP bug that sometimes caused false exceptions to be raised. Phil From ejoy at peoplemail.com.cn Sat Apr 13 15:14:12 2002 From: ejoy at peoplemail.com.cn (ejoy) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: How can I use SIP to wrap STL class? In-Reply-To: References: Message-ID: <200204131314.PAA17926@mail.gmd.de> On Wednesday 10 April 2002 17:29, you wrote: > If you can't modify the C++ code to return a Python list, you will > need to write %MemberCode (following foo's declaration in the .sip > file) to accomplish that (I'm sure Phil will correct me if I'm > wrong). "ListType" can be any name you choose. "sipCpp" and > "sipCppPtr" in the PyQt/PyKDE2 examples are the pointers that > represent the data to and from C++ respectively - use those names. Thanks Jim for his kindly reply.I've created a vecstring.sip from qstrlist.sip and a a.sip to wrap: #include #include using namespace std; class A { public: A(); ~A(); void foo(const vector&,vector&); }; The a.sip looks like: %Module A %Include vecstring.sip %HeaderCode #include "a.h" %End class A{ public: void foo(const VecString&,VecString&); }; and the vecstring.sip is in attachment. The compile progress is ok with the following output: /usr/local/bin/sip -s ".cpp" -c sip a.sip cd sip && make make[1]: Entering directory `/home/zl/prj/py/py/sip' g++ -c -I.. -I. -I/usr/include/python2.1 -I/usr/local/include/sip Acmodule.cpp g++ -c -I.. -I. -I/usr/include/python2.1 -I/usr/local/include/sip sipAA.cpp g++ -shared -L/usr/local/lib/ -lsip -o libAcmodule.so *.o make[1]: Leaving directory `/home/zl/prj/py/py/sip' When I try to import A from python interpreter a error occurs: >>> import A Traceback (most recent call last): File "", line 1, in ? import A File "/home/zl/prj/py/py/sip2/A.py", line 5, in ? import libAc ImportError: /home/zl/prj/py/py/sip2/libAcmodule.so: undefined symbol: sipConvertTo_VecString__FP7_objectPPt6vector2Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i0Zt9allocator1Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i0Pi >>> import A Seems like a linking problem but I'm not sure. Can you tell me where is the problem? -- Sincerely yours, ejoy -------------- next part -------------- A non-text attachment was scrubbed... Name: vecstring.sip Type: text/x-c++ Size: 1398 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020413/2ab8c5fc/vecstring.bin From laurenceliew at yahoo.com.sg Sun Apr 14 03:40:24 2002 From: laurenceliew at yahoo.com.sg (Laurence Liew) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt 3.1: configure does not produce Makefile References: <3CB28D61.8060000@esrf.fr> <3CB8096A.262F02BE@river-bank.demon.co.uk> Message-ID: <3CB8DE82.9000207@yahoo.com.sg> Hi all.. Sorry my fault. I have managed to solve the problem. Apparently my downloaded .tgz file was corrupted and did not contain all the required files... After a fresh download, everything worked. Thanks! Laurence > Hi all.. > > I have just installed Python 2.2, QT 3.0.1. I tried to install PyQt 3.1 > without success. > > I tried the usual > > ./configure > make > make install > > However, ./configure did not produce any Makefile. The last statement > that configure produces is "configure: creating ./config.status" > > However configure also did not produce any config.status > > Any help would be appreciated. > > Laurence > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From phil at river-bank.demon.co.uk Sun Apr 14 20:05:17 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] PyQt 3.1, Win2000, and MSVC runtime library References: <3CB59D30.8767CBFE@fluent.com> Message-ID: <3CB9C4A5.BF59A7D7@river-bank.demon.co.uk> Paul Felix wrote: > > Hi, > > I want to pass on a fix I made to the Windows build of PyQt/Sip 3.1 using > MS VC++. > > My build configuration is as follows: > > NT 4.0 SP 5 > VC++ 6.0 SP 5 > PyQt/Sip 3.1 > Qt 3.0.3 > Python 2.2.0 > > After building PyQt, I was able to run the PyQt examples on my NT 4.0 box, but > when I ran the examples on a Win2000 box, they crashed at various times (most > often when exiting the app). Here is the Win2000 configuration I tested: > > Windows 2000 Professional > 5.0.2195 SP 2 > > While investigating, I noticed that the build was mixing static (MT) and DLL > (MD) versions of the C runtime library: > > Package C runtime option > ------- ---------------- > Python -MD > Qt -MD > PyQt/Sip -MT > > This is a no-no according to our friends at Microsoft: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_.2f.md.2c_2f.ml.2c_2f.mt.2c_2f.ld.asp > > I went back to the PyQt/Sip build and changed the Makefile.win32-msvc files, > replacing -MT with -MD. Now the examples run fine for me on both NT 4.0 and > Win2000. > > This is a head scratcher, because I know some of you are running on Win2000 > without problems -- maybe you made this fix too. Thanks. The origin of this seems to be a bug in tmake. Phil From phil at thekompany.com Sun Apr 14 20:06:19 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog qapplication.sip qpeapplication.sip qtmod.sip-in qtsqlmod.sip-in qtxmlmod.sip-in subbuild.sip-in" Message-ID: <20020414180757.28E093FA63@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv15384 Modified Files: ChangeLog qapplication.sip qpeapplication.sip qtmod.sip-in qtsqlmod.sip-in qtxmlmod.sip-in subbuild.sip-in Log Message: Reinstated PyQtDisownTopLevelWidgets() because it solves the problem where we can't guarantee that the order in which qApp and the top level widgets will be destroyed. Changed -MT to -MD for Windows (thanks to Paul Felix). From jbublitz at nwinternet.com Mon Apr 15 00:25:43 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: How can I use SIP to wrap STL class? In-Reply-To: <200204141000.MAA15488@mats.gmd.de> Message-ID: On 14-Apr-02 ejoy wrote: > On Wednesday 10 April 2002 17:29, you wrote: >> If you can't modify the C++ code to return a Python list, you >> will need to write %MemberCode (following foo's declaration in >> the .sip file) to accomplish that (I'm sure Phil will correct >> me if I'm wrong). "ListType" can be any name you choose. >> "sipCpp" and "sipCppPtr" in the PyQt/PyKDE2 examples are the >> pointers that represent the data to and from C++ respectively >> - use those names. > Thanks Jim for his kindly reply.I've created a vecstring.sip from > qstrlist.sip > and a a.sip to wrap: >#include >#include > using namespace std; > class A { > public: > A(); > ~A(); > void foo(const vector&,vector&); > }; > The a.sip looks like: > %Module A > %Include vecstring.sip > %HeaderCode >#include "a.h" > %End > class A{ > public: > void foo(const VecString&,VecString&); > }; I don't see anything wrong so far ... > and the vecstring.sip is in attachment. I looked at the attachment quickly and it looks correct. > The compile progress is ok with the following output: > /usr/local/bin/sip -s ".cpp" -c sip a.sip This step should produce a .h and .cpp file - the .cpp file should contain the code you wrote in vecstring.sip. I'm not sure how this will be named - something like "sipvecstring.cpp" or "sipAvecstring.cpp" I'd guess. > cd sip && make > make[1]: Entering directory `/home/zl/prj/py/py/sip' > g++ -c -I.. -I. -I/usr/include/python2.1 > -I/usr/local/include/sip > Acmodule.cpp > g++ -c -I.. -I. -I/usr/include/python2.1 > -I/usr/local/include/sip sipAA.cpp > g++ -shared -L/usr/local/lib/ -lsip -o libAcmodule.so *.o > make[1]: Leaving directory `/home/zl/prj/py/py/sip' I don't see any place where the code for the %Mapped Type stuff is being compiled - you'll need to make sure the file sip created from vecstring.sip is included in the build (in the makefile). a.sip produced Acmodule.cpp, and your 'A 'class produced sipAA.cpp, but neither includes/contains the vecstring code. sip produces a .cpp/.h file for each class or %MappedType in the input set. > When I try to import A from python interpreter a error occurs: > >>>> import A > Traceback (most recent call last): > File "", line 1, in ? > import A > File "/home/zl/prj/py/py/sip2/A.py", line 5, in ? > import libAc > ImportError: /home/zl/prj/py/py/sip2/libAcmodule.so: undefined > symbol: > sipConvertTo_VecString__FP7_objectPPt6vector2Zt12basic_string3ZcZt > 18string_char_traits1ZcZt24__default_alloc_template2b1i0Zt9allocat > or1Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc > _template2b1i0Pi >>>> import A That's an amazingly mangled name! My guess is you're getting the error because the %Mapped Type code (which will produce sipConvertTo... and sipConvertFrom... functions) hasn't been compiled in and linked. > Seems like a linking problem but I'm not sure. > Can you tell me where is the problem? Hope that helps - I can't see any other problem at the moment. You seem to have done a good job figuring out how sip operates. Jim From chris_burn at bigfoot.com Mon Apr 15 09:21:24 2002 From: chris_burn at bigfoot.com (Chris Burn) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: Help getting started with applets References: Message-ID: <02Apr15.173035est.115230@gateway.al.com.au> Thanks for the pointers but I don't think I have enough knowledge of KDE or embedding python to attempt this. So I'll wait until you have the time to write something up, if that's ok. Thanks Chris Jim Bublitz wrote: >On 11-Apr-02 ian reinhart geiser wrote: > >>We are actually talking about this in KDE. The current plan is >>to make a wrapper KPart and Kicker applet that will load PyKDE >>applets... >> > >That's pretty much what I was getting at. > > >>I am not sure what the progress on this is. >> > > >>I can crank out a kicker applet in about 5 min, the hard part >>would be loading the pyqt code. is anyone here an embedding >>expert that would want to attack at least kicker applets with >>me first? >> > >Loading PyQt or PyKDE2 code just requires a Python 'import' >statement in the script you want to run. You'd want to load Python >scripts - not PyQt or PyKDE2 code especially. It's not necessary >for the KPart/applet to know anything about PyQt or PyKDE2. You >could probably write applets with Tk, PyGTK or wxWindows too - I >assume applets have their own event loop, which is the only major >consideration I can think of. > > >>if we can do a kicker applet any kpart would be trivial. >> > >I already have a working KPart, so the kicker applet won't be a lot >of work. I just need to find the time to write it up. As far as I >can see, KDE already has all the necessary machinery to implement >this except the Python specific stuff. > >There are some potential problems (concurrency), but probably >nothing major. > > >Jim > > >_______________________________________________ >PyKDE mailing list PyKDE@mats.gmd.de >http://mats.gmd.de/mailman/listinfo/pykde > > From phil at river-bank.demon.co.uk Tue Apr 16 06:05:57 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Building PyQT without SGI style References: <20020408134233.GC21497@strakt.com> Message-ID: <3CB8095E.C149347F@river-bank.demon.co.uk> Fredrik Juhlin wrote: > > Hi! > > I'm trying to build PyQT but I'm running into trouble. > > I've come to the point where I can get it to compile, but when Python tries > to import the module, I get the error > "ImportError: /usr/local/lib/python2.2/site-packages/libqtcmodule.so: undefined > symbol: qt_cast__9QSGIStylePCc". > > I'm building PyQT on a Debian machine and found that QT was indeed compiled > without SGI style support. IS there any way to build PyQT so that it doesn't > depend on the SGI style? If they have missed out classes then they should also have added #defines to $QTDIR/include/qconfig.h. Try adding... #define QT_NO_STYLE_SGI ...to that file and re-build PyQt. Phil From robinsummerhill at cyantechnology.com Tue Apr 16 10:01:14 2002 From: robinsummerhill at cyantechnology.com (Robin Summerhill) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python Message-ID: <53355E40BBE8D411A8740002B30CEA570AAF13@SERVER1> I finally worked out what was going wrong here. It's to do with the requirement to mark declarations with __declspec(DLLEXPORT) or _declspec(DLLIMPORT)to get DLL linking working properly with MSVC. SIP_EXTERN is declared in sip.h and ends up as SIP_EXPORT or SIP_IMPORT according to whether the preprocessor symbols SIP_MAKE_DLL or SIP_USE_DLL are defined. Sip.exe uses this declaration to enable sip-generated headers to be used both in building the dll (EXPORT) and the client of the dll (IMPORT). However, the sip-generated headers that are included in the PyQT distribution have been edited to change SIP_EXTERN to SIP_EXPORT, meaning that these headers can only be used to build the libqtc dll, *not* consume it. There is no clean way around this with the present setup, because SIP_EXTERN is used in the SIP headers too. You can't just change SIP_EXPORT back to SIP_EXTERN because that prevents you from building libqtc. As a temporary measure, I'm keeping two sets of the libqtc headers - one to build libqtc (with SIP_EXORT) and one to include in the client (with SIP_EXTERN and SIP_USE_DLL defined) Having done this (and recompiling everything with -MD to solve my other problems) I can now embed PyQT and it's just *fantastic* Robin Summerhill -----Original Message----- From: Phil Thompson [mailto:phil@river-bank.demon.co.uk] Sent: 13 April 2002 11:33 To: Robin Summerhill Subject: Re: [PyKDE] Passing C++-created QWidgets to embedded Python Robin Summerhill wrote: > > Hi, > > I'm embedding PyQT in a C++ application and am trying to extend the > interpreter with my app's object model. > > I know I need to do something like the following to pass a C++-created > widget to Python: > > #include > #include > #include > > static PyObject *py_getWidget(PyObject *self, PyObject *args) > { > PyObject* p = sipMapCppToSelf(reinterpret_cast(pWidget), > sipClass_QWidget); > return p; > } > > However, when I try to link this (MSVC6 with SP5) I get: > > error LNK2001: unresolved external symbol "struct _object * > sipClass_QWidget" (?sipClass_QWidget@@3PAU_object@@A) > > I'm linking against libsip.lib and libqtc.lib. Looking at the exports from > libqtc.lib with dumpbin, sipClass_QWidget is present and correct with the > right mangled name. Other symbols such as sipQWidget *are* accessible. > > I'm probably doing something really stupid but I can't see it. Can anyone > give me any insight or send my some example code that works? It should work - but I'm not aware of anybody who has already done what you are trying to do under Windows, and I am no Windows expert. Phil From geiseri at yahoo.com Tue Apr 16 13:30:38 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python In-Reply-To: <53355E40BBE8D411A8740002B30CEA570AAF13@SERVER1> References: <53355E40BBE8D411A8740002B30CEA570AAF13@SERVER1> Message-ID: <200204160730.30531.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cool this explanes why I get all of these funky crashes. I guess no-one ever assumed PyQt would every be crossplaform :\ Robin could you please send me a diff of your changes or the pyqt headers you used. I unfortunately cannot wait for the next PyQt release to fix all of these windows bugs. I wonder if we cannot make a PYQT_EXPORT and PYQT_IMPORT? I am not sure how we can get these autogenerated on the fly though. Any thoughts on this Phil? - -ian reinhart geiser On Tuesday 16 April 2002 04:00 am, Robin Summerhill wrote: > I finally worked out what was going wrong here. > > > It's to do with the requirement to mark declarations with > __declspec(DLLEXPORT) or _declspec(DLLIMPORT)to get DLL linking working > properly with MSVC. > > > SIP_EXTERN is declared in sip.h and ends up as SIP_EXPORT or SIP_IMPORT > according to whether the preprocessor symbols SIP_MAKE_DLL or SIP_USE_DLL > are defined. Sip.exe uses this declaration to enable sip-generated headers > to be used both in building the dll (EXPORT) and the client of the dll > (IMPORT). However, the sip-generated headers that are included in the PyQT > distribution have been edited to change SIP_EXTERN to SIP_EXPORT, meaning > that these headers can only be used to build the libqtc dll, *not* consume > it. > > > There is no clean way around this with the present setup, because > SIP_EXTERN is used in the SIP headers too. You can't just change SIP_EXPORT > back to SIP_EXTERN because that prevents you from building libqtc. > > > As a temporary measure, I'm keeping two sets of the libqtc headers - one to > build libqtc (with SIP_EXORT) and one to include in the client (with > SIP_EXTERN and SIP_USE_DLL defined) > > > Having done this (and recompiling everything with -MD to solve my other > problems) I can now embed PyQT and it's just *fantastic* > > > Robin Summerhill -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vAtWPy62TRm8dvgRAobcAJ0QHVqS9g6Gjx+NUP9X0qiO772XgwCfVcbC 4Gge3cKNRnZkCwTnrHIY4m0= =IOOu -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From geiseri at yahoo.com Tue Apr 16 13:37:25 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: Help getting started with applets In-Reply-To: References: Message-ID: <200204160737.18452.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 11 April 2002 04:47 pm, Jim Bublitz wrote: > On 11-Apr-02 ian reinhart geiser wrote: > > We are actually talking about this in KDE. The current plan is > > to make a wrapper KPart and Kicker applet that will load PyKDE > > applets... > > That's pretty much what I was getting at. > I have to get the latest PyKDE and check it out, I have been neck deep in the qt stuff on win32, I have been igoreing the "important" things ;) [...] > > if we can do a kicker applet any kpart would be trivial. > > I already have a working KPart, so the kicker applet won't be a lot > of work. I just need to find the time to write it up. As far as I > can see, KDE already has all the necessary machinery to implement > this except the Python specific stuff. You actually have a python KPart loading into a C++ app? Could you post the code in PyKDE, so we can let people know we are ready for business? Cheers - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vAzuPy62TRm8dvgRAuxVAKCA1EGEXKjo32dVdW1NV9//to7nLgCeOZbI 5gtfXivu716/CBNlXmZXJww= =Mp67 -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From rengelin at strw.leidenuniv.nl Tue Apr 16 13:42:24 2002 From: rengelin at strw.leidenuniv.nl (Roeland Rengelink) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Problems building PyQt3.1 Message-ID: <200204161141.g3GBfqZ32471@sloten.strw.leidenuniv.nl> Hi, I have problems building PyQt-3.1 for Python2.2 and Qt3.0.3 under RH Linux. configure and make seem to run succesfully, but make install gives: Libraries have been installed in: /data/software/lib/python2.2/site-packages make[3]: Entering directory `/data/software/packages/PyQt-3.1/qt' (cd /tmp; PYTHONPATH=/data/software/lib/python2.2/site-packages:/data/software/lib/python2.2/site-packages /data/software/bin/python -c "import qt") Traceback (most recent call last): File "", line 1, in ? File "/data/software/lib/python2.2/site-packages/qt.py", line 47, in ? import libqtc ImportError: /data/software/lib/python2.2/site-packages/libqtcmodule.so: undefined symbol: __ti8sipProxy i.e, importing libqtc fails with undefined symbols. It appears that __ti8sipProxy is the only symbol in the __ti*sip* family that is undefined, > nm libqtcmodule.so | grep "U __ti[0-9]*sip" U __ti8sipProxy This suggests to me that an individual object file was omitted in linking. Unfortunately I haven't been able to deduce where this symbol should have been defined. Am I missing something obvious? Regards, Roeland -- rengelin at strw.leidenuniv.nl From phil at thekompany.com Tue Apr 16 16:15:55 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog Makefile qapplication.sip qbytearray.sip qcanvas.sip qcolor.sip qcolordialog.sip qcommonstyle.sip qcstring.sip qdatastream.sip qdialog.sip qdockarea.sip qdom.sip qfile.sip qfontdialog.sip qimage.sip qinputdialog.sip qinterlacestyle.sip qiodevice.sip qkeysequence.sip qlayout.sip qlineedit.sip qlistbox.sip qmainwindow.sip qmotifplusstyle.sip qmotifstyle.sip qmovie.sip qmultilinedit.sip qpainter.sip qpeapplication.sip qpicture.sip qpixmap.sip qplatinumstyle.sip qpointarray.sip qpopupmenu.sip qrect.sip qregexp.sip qscrollview.sip qsemaphore.sip qsettings.sip qsgistyle.sip qsocket.sip qspinbox.sip qsplitter.sip qstring.sip qstringlist.sip qstyle.sip qtabbar.sip qtableview.sip qtdocs.sip-in qtextcodec.sip qtextedit.sip qtextstream.sip qthread.sip qtmod.sip-in qtsqlmod.sip-in qtxmlmod.sip-in qurloperator.sip qvalidator.sip qwidget.sip qwindowsstyle.sip qwmatrix.sip subbuild.sip-in versions.sip" Message-ID: <20020416141745.739F23FA83@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv27518 Modified Files: ChangeLog Makefile qapplication.sip qbytearray.sip qcanvas.sip qcolor.sip qcolordialog.sip qcommonstyle.sip qcstring.sip qdatastream.sip qdialog.sip qdockarea.sip qdom.sip qfile.sip qfontdialog.sip qimage.sip qinputdialog.sip qinterlacestyle.sip qiodevice.sip qkeysequence.sip qlayout.sip qlineedit.sip qlistbox.sip qmainwindow.sip qmotifplusstyle.sip qmotifstyle.sip qmovie.sip qmultilinedit.sip qpainter.sip qpeapplication.sip qpicture.sip qpixmap.sip qplatinumstyle.sip qpointarray.sip qpopupmenu.sip qrect.sip qregexp.sip qscrollview.sip qsemaphore.sip qsettings.sip qsgistyle.sip qsocket.sip qspinbox.sip qsplitter.sip qstring.sip qstringlist.sip qstyle.sip qtabbar.sip qtableview.sip qtdocs.sip-in qtextcodec.sip qtextedit.sip qtextstream.sip qthread.sip qtmod.sip-in qtsqlmod.sip-in qtxmlmod.sip-in qurloperator.sip qvalidator.sip qwidget.sip qwindowsstyle.sip qwmatrix.sip subbuild.sip-in versions.sip Log Message: Removed all the /ReleaseLock/ options. Added Py_BEGIN_ALLOW_THREADS, Py_END_ALLOW_THREADS, SIP_BLOCK_THREADS and SIP_UNBLOCK_THREADS to all handwritten code. Thread support is only enabled if it is also enabled in Python. Added /CreatesThread/ and /NewThread/ to QThread. From phil at thekompany.com Tue Apr 16 16:21:27 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog NEWS configure.ac" Message-ID: <20020416142321.06C8D3FA83@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv27562 Modified Files: ChangeLog NEWS configure.ac Log Message: Replaced all the old thread support with explicit support for classes that can create new threads. Removed /ReleaseLock/ - the Python lock is released for any call to C++, not just selected ones. Added /CreatesThread/ and /NewThread/. SIP_USE_DLL is no longer needed, but SIP_MAKE_MODULE_DLL is now needed when compilinga SIP generated module under Windows. From phil at thekompany.com Tue Apr 16 16:21:28 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "sip/sip gencode.c parser.y sip.h" Message-ID: <20020416142322.886903FA9D@valentine.thekompany.com> Update of /home/cvs/public/sip/sip In directory valentine:/tmp/cvs-serv27562/sip Modified Files: gencode.c parser.y sip.h Log Message: Replaced all the old thread support with explicit support for classes that can create new threads. Removed /ReleaseLock/ - the Python lock is released for any call to C++, not just selected ones. Added /CreatesThread/ and /NewThread/. SIP_USE_DLL is no longer needed, but SIP_MAKE_MODULE_DLL is now needed when compilinga SIP generated module under Windows. From phil at thekompany.com Tue Apr 16 16:21:39 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "sip/siplib threads.c Makefile.am qtlib.cpp sip.h sipint.h siplib.c" Message-ID: <20020416142322.B382E3FA9E@valentine.thekompany.com> Update of /home/cvs/public/sip/siplib In directory valentine:/tmp/cvs-serv27562/siplib Modified Files: Makefile.am qtlib.cpp sip.h sipint.h siplib.c Added Files: threads.c Log Message: Replaced all the old thread support with explicit support for classes that can create new threads. Removed /ReleaseLock/ - the Python lock is released for any call to C++, not just selected ones. Added /CreatesThread/ and /NewThread/. SIP_USE_DLL is no longer needed, but SIP_MAKE_MODULE_DLL is now needed when compilinga SIP generated module under Windows. From geiseri at yahoo.com Tue Apr 16 16:27:59 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python In-Reply-To: <53355E40BBE8D411A8740002B30CEA570AAF15@SERVER1> References: <53355E40BBE8D411A8740002B30CEA570AAF15@SERVER1> Message-ID: <200204161027.51863.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 16 April 2002 10:16 am, Robin Summerhill wrote: > Ian, > > I just did a find and replace of SIP_EXPORT to SIP_EXTERN in all the PyQT > headers. Make sure you define SIP_USE_DLL in the client. If you need to > rebuild libqtc later, you will need to change SIP_EXTERN back to > SIP_EXPORT. > > Robin > Hrm, I am digging through the headers now, Phil, can we make a PY_MAKE_DLL flag that will swap SIP_EXPORT to SIP_EXTERN for a more automated build? So to build Python bindings based off of PyQt we can do a: -DSIP_USE_DLL -DPY_MAKE_DLL To cause everything to export correctly? Robin if I understand you correctly you did not rebuild PyQt after you made the changes to the header files? I am not an expert at building windows DLLs so I am looking for the most automated solution as possible. Thanks - -ian reinhart geiser > -----Original Message----- > From: ian reinhart geiser [mailto:geiseri@yahoo.com] > Sent: 16 April 2002 12:31 > To: Robin Summerhill; 'Phil Thompson'; pykde@mats.gmd.de > Subject: Re: [PyKDE] Passing C++-created QWidgets to embedded Python > > > Cool this explanes why I get all of these funky crashes. I guess no-one > ever > assumed PyQt would every be crossplaform :\ > > Robin could you please send me a diff of your changes or the pyqt headers > you > used. I unfortunately cannot wait for the next PyQt release to fix all of > these windows bugs. > > I wonder if we cannot make a PYQT_EXPORT and PYQT_IMPORT? I am not sure > how > > we can get these autogenerated on the fly though. Any thoughts on this > Phil? > > -ian reinhart geiser > > On Tuesday 16 April 2002 04:00 am, Robin Summerhill wrote: > > I finally worked out what was going wrong here. > > > > > > It's to do with the requirement to mark declarations with > > __declspec(DLLEXPORT) or _declspec(DLLIMPORT)to get DLL linking working > > properly with MSVC. > > > > > > SIP_EXTERN is declared in sip.h and ends up as SIP_EXPORT or SIP_IMPORT > > according to whether the preprocessor symbols SIP_MAKE_DLL or SIP_USE_DLL > > are defined. Sip.exe uses this declaration to enable sip-generated > > headers to be used both in building the dll (EXPORT) and the client of > > the dll (IMPORT). However, the sip-generated headers that are included in > > the PyQT distribution have been edited to change SIP_EXTERN to > > SIP_EXPORT, meaning that these headers can only be used to build the > > libqtc dll, *not* consume it. > > > > > > There is no clean way around this with the present setup, because > > SIP_EXTERN is used in the SIP headers too. You can't just change > > SIP_EXPORT > > > back to SIP_EXTERN because that prevents you from building libqtc. > > > > > > As a temporary measure, I'm keeping two sets of the libqtc headers - one > > to > > > build libqtc (with SIP_EXORT) and one to include in the client (with > > SIP_EXTERN and SIP_USE_DLL defined) > > > > > > Having done this (and recompiling everything with -MD to solve my other > > problems) I can now embed PyQT and it's just *fantastic* > > > > > > Robin Summerhill > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vDTnPy62TRm8dvgRAgjdAJ0YnoCDThpZziOwwDL/4zlJKE6LFACgrb8c 2+yp2Mf8OHR4+eqBDtK175Q= =LQDw -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From phil at river-bank.demon.co.uk Tue Apr 16 16:43:15 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Problems building PyQt3.1 References: <200204161141.g3GBfqZ32471@sloten.strw.leidenuniv.nl> Message-ID: <3CBC384F.1367F60E@river-bank.demon.co.uk> Roeland Rengelink wrote: > > Hi, > > I have problems building PyQt-3.1 for Python2.2 and Qt3.0.3 under RH Linux. > > configure and make seem to run succesfully, but make install gives: > > > Libraries have been installed in: > /data/software/lib/python2.2/site-packages > > make[3]: Entering directory `/data/software/packages/PyQt-3.1/qt' > (cd /tmp; PYTHONPATH=/data/software/lib/python2.2/site-packages:/data/software/lib/python2.2/site-packages /data/software/bin/python -c "import qt") > Traceback (most recent call last): > File "", line 1, in ? > File "/data/software/lib/python2.2/site-packages/qt.py", line 47, in ? > import libqtc > ImportError: /data/software/lib/python2.2/site-packages/libqtcmodule.so: undefined symbol: __ti8sipProxy > > i.e, importing libqtc fails with undefined symbols. > > It appears that __ti8sipProxy is the only symbol in the __ti*sip* > family that is undefined, > > > nm libqtcmodule.so | grep "U __ti[0-9]*sip" > U __ti8sipProxy > > This suggests to me that an individual object file was omitted in > linking. Unfortunately I haven't been able to deduce where this symbol > should have been defined. Am I missing something obvious? Sounds like you have built SIP with Qt support disabled. Check the output of configure. Phil From phil at river-bank.demon.co.uk Tue Apr 16 16:43:50 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python References: <53355E40BBE8D411A8740002B30CEA570AAF13@SERVER1> Message-ID: <3CBC385E.E3532461@river-bank.demon.co.uk> Robin Summerhill wrote: > > I finally worked out what was going wrong here. > > It's to do with the requirement to mark declarations with > __declspec(DLLEXPORT) or _declspec(DLLIMPORT)to get DLL linking working > properly with MSVC. > > SIP_EXTERN is declared in sip.h and ends up as SIP_EXPORT or SIP_IMPORT > according to whether the preprocessor symbols SIP_MAKE_DLL or SIP_USE_DLL > are defined. Sip.exe uses this declaration to enable sip-generated headers > to be used both in building the dll (EXPORT) and the client of the dll > (IMPORT). However, the sip-generated headers that are included in the PyQT > distribution have been edited to change SIP_EXTERN to SIP_EXPORT, meaning > that these headers can only be used to build the libqtc dll, *not* consume > it. > > There is no clean way around this with the present setup, because SIP_EXTERN > is used in the SIP headers too. You can't just change SIP_EXPORT back to > SIP_EXTERN because that prevents you from building libqtc. Hopefully fixed in 3.2 - but I haven't tested it. You won't need to specify SIP_USE_DLL anymore - things "should just work". If you are creating a module that %Imports the PyQt .sip files then you will now need -DSIP_MAKE_MODULE_DLL in the CXXFLAGS. Phil From geiseri at yahoo.com Tue Apr 16 16:51:23 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python In-Reply-To: <3CBC385E.E3532461@river-bank.demon.co.uk> References: <53355E40BBE8D411A8740002B30CEA570AAF13@SERVER1> <3CBC385E.E3532461@river-bank.demon.co.uk> Message-ID: <200204161051.15557.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 16 April 2002 10:42 am, Phil Thompson wrote: > Robin Summerhill wrote: > > I finally worked out what was going wrong here. > > > > It's to do with the requirement to mark declarations with > > __declspec(DLLEXPORT) or _declspec(DLLIMPORT)to get DLL linking working > > properly with MSVC. > > > > SIP_EXTERN is declared in sip.h and ends up as SIP_EXPORT or SIP_IMPORT > > according to whether the preprocessor symbols SIP_MAKE_DLL or SIP_USE_DLL > > are defined. Sip.exe uses this declaration to enable sip-generated > > headers to be used both in building the dll (EXPORT) and the client of > > the dll (IMPORT). However, the sip-generated headers that are included in > > the PyQT distribution have been edited to change SIP_EXTERN to > > SIP_EXPORT, meaning that these headers can only be used to build the > > libqtc dll, *not* consume it. > > > > There is no clean way around this with the present setup, because > > SIP_EXTERN is used in the SIP headers too. You can't just change > > SIP_EXPORT back to SIP_EXTERN because that prevents you from building > > libqtc. > > Hopefully fixed in 3.2 - but I haven't tested it. You won't need to > specify SIP_USE_DLL anymore - things "should just work". > > If you are creating a module that %Imports the PyQt .sip files then you > will now need -DSIP_MAKE_MODULE_DLL in the CXXFLAGS. Will this work the same if I am includeing other .sip files from other C modules I have built? Also when building a C module that is not based off of PyQt and just SIP will I need any special arguments to allow for it to export properly? - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vDpjPy62TRm8dvgRAoB8AKCGW7Dm8YZ+ds2OkJEDjtsE4EfLlgCgi8Vi /aV3kIzvfSGDrysOpfeFD7s= =7vpf -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From phil at river-bank.demon.co.uk Tue Apr 16 17:09:34 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] ANN: SIP/PyQt v3.2rc1 Message-ID: <3CBC3E80.BE907E4@river-bank.demon.co.uk> v3.2rc1 of SIP and PyQt are available at http://www.riverbankcomputing.co.uk/download/snapshots/. This is mainly a bug fix release... - indexing a QStringList should work again - Windows build issues (hopefully) resolved - added the missing QToolTip.enabled() and QToolTip.setEnabled() - QThread and friends should now work properly Because of the thread changes, this version of SIP may introduce some incompatibilities for people using handwritten code when wrapping their own classes. I'm particularly interested to know if applications that use the Python thread API still work Ok. Phil From phil at river-bank.demon.co.uk Tue Apr 16 17:10:53 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python References: <53355E40BBE8D411A8740002B30CEA570AAF13@SERVER1> <3CBC385E.E3532461@river-bank.demon.co.uk> <200204161051.15557.geiseri@yahoo.com> Message-ID: <3CBC3ECF.C0DB5177@river-bank.demon.co.uk> ian reinhart geiser wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 16 April 2002 10:42 am, Phil Thompson wrote: > > Robin Summerhill wrote: > > > I finally worked out what was going wrong here. > > > > > > It's to do with the requirement to mark declarations with > > > __declspec(DLLEXPORT) or _declspec(DLLIMPORT)to get DLL linking working > > > properly with MSVC. > > > > > > SIP_EXTERN is declared in sip.h and ends up as SIP_EXPORT or SIP_IMPORT > > > according to whether the preprocessor symbols SIP_MAKE_DLL or SIP_USE_DLL > > > are defined. Sip.exe uses this declaration to enable sip-generated > > > headers to be used both in building the dll (EXPORT) and the client of > > > the dll (IMPORT). However, the sip-generated headers that are included in > > > the PyQT distribution have been edited to change SIP_EXTERN to > > > SIP_EXPORT, meaning that these headers can only be used to build the > > > libqtc dll, *not* consume it. > > > > > > There is no clean way around this with the present setup, because > > > SIP_EXTERN is used in the SIP headers too. You can't just change > > > SIP_EXPORT back to SIP_EXTERN because that prevents you from building > > > libqtc. > > > > Hopefully fixed in 3.2 - but I haven't tested it. You won't need to > > specify SIP_USE_DLL anymore - things "should just work". > > > > If you are creating a module that %Imports the PyQt .sip files then you > > will now need -DSIP_MAKE_MODULE_DLL in the CXXFLAGS. > Will this work the same if I am includeing other .sip files from other C > modules I have built? I assume you mean import rather than include. > Also when building a C module that is not based off of PyQt and just SIP will > I need any special arguments to allow for it to export properly? -DSIP_MAKE_MODULE_DLL is now needed for any module that you are building. Phil From geiseri at yahoo.com Tue Apr 16 18:16:18 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] ANN: SIP/PyQt v3.2rc1 In-Reply-To: <3CBC3E80.BE907E4@river-bank.demon.co.uk> References: <3CBC3E80.BE907E4@river-bank.demon.co.uk> Message-ID: <200204161216.11264.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 16 April 2002 11:08 am, Phil Thompson wrote: > v3.2rc1 of SIP and PyQt are available at > http://www.riverbankcomputing.co.uk/download/snapshots/. > > This is mainly a bug fix release... > > - indexing a QStringList should work again > - Windows build issues (hopefully) resolved > - added the missing QToolTip.enabled() and QToolTip.setEnabled() > - QThread and friends should now work properly > > Because of the thread changes, this version of SIP may introduce some > incompatibilities for people using handwritten code when wrapping their > own classes. > > I'm particularly interested to know if applications that use the Python > thread API still work Ok. How much will this break when I upgrade if I am not using threads in my wrapped code? Are there issues with using Python21 instead of 2.2? I know the conversion from 3.0 -> 3.1 messed me up pretty bad with my build scripts. Do I need to regenerate my bindings? Will the regenerated bindings break in new and interesting ways? Is there a way to backport the DLL and the QStringList changes to 3.1 to keep the bugs to a minimum? Thanks - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vE5LPy62TRm8dvgRAsCvAKDlh0Y/VXA/7j0tacKo8d0tIGKKcwCgnVQj OaToVfXyh3OqRMKyxbYbY7Y= =hhR8 -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From geiseri at yahoo.com Tue Apr 16 19:07:38 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python In-Reply-To: <3CBC3ECF.C0DB5177@river-bank.demon.co.uk> References: <53355E40BBE8D411A8740002B30CEA570AAF13@SERVER1> <200204161051.15557.geiseri@yahoo.com> <3CBC3ECF.C0DB5177@river-bank.demon.co.uk> Message-ID: <200204161307.30111.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 16 April 2002 11:10 am, Phil Thompson wrote: > > -DSIP_MAKE_MODULE_DLL is now needed for any module that you are > building. Is this true for libsip too? With the current makefile you get the following error: unresolved external symbol _sipBlockThreads Or are the Makefiles out of date? TIA - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vFpSPy62TRm8dvgRArI4AKDjNzTmQmruPQj9QE/3wKNTZ69J7wCgubDb 5n+vtXk60LY4wT28oZMAml0= =nHdd -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From jbublitz at nwinternet.com Tue Apr 16 19:26:53 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Re: Help getting started with applets In-Reply-To: <200204160737.18452.geiseri@yahoo.com> Message-ID: On 16-Apr-02 ian reinhart geiser wrote: > You actually have a python KPart loading into a C++ app? > Could you post the code in PyKDE, so we can let people know we > are ready for business? Actually it's a KSpread plugin, but it needs a lot of work before it's releasable - consider it vaporware. KParts/plugins/panel applets are all basically the Same Thing. I'll probably do the panel applet stuff first, since that's more developer-oriented and doesn't require as much documentation. I haven't got the packaging all sorted out yet, but it'll probably be a base library/plugin that wraps/interfaces libpython and then individual plugins or libraries for specific apps (like KSpread) or functions (like panel applets) that load and communicate with the libpython plugin. Partitioning that stuff still needs some work. Jim From phil at thekompany.com Tue Apr 16 20:15:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog configure mkinstalldirs" Message-ID: <20020416181655.CEA5E3FA9E@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv32466 Modified Files: ChangeLog configure mkinstalldirs Log Message: Minor build portability change for MacOS/X. From phil at thekompany.com Tue Apr 16 20:15:10 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "sip/siplib Makefile.in sipint.h siplib.c" Message-ID: <20020416181655.EB7173FA5A@valentine.thekompany.com> Update of /home/cvs/public/sip/siplib In directory valentine:/tmp/cvs-serv32466/siplib Modified Files: Makefile.in sipint.h siplib.c Log Message: Minor build portability change for MacOS/X. From phil at river-bank.demon.co.uk Tue Apr 16 20:16:10 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] Passing C++-created QWidgets to embedded Python References: <53355E40BBE8D411A8740002B30CEA570AAF13@SERVER1> <200204161051.15557.geiseri@yahoo.com> <3CBC3ECF.C0DB5177@river-bank.demon.co.uk> <200204161307.30111.geiseri@yahoo.com> Message-ID: <3CBC7855.2F51D99D@river-bank.demon.co.uk> ian reinhart geiser wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 16 April 2002 11:10 am, Phil Thompson wrote: > > > > -DSIP_MAKE_MODULE_DLL is now needed for any module that you are > > building. > > Is this true for libsip too? No. > With the current makefile you get the following error: > unresolved external symbol _sipBlockThreads > > Or are the Makefiles out of date? The Makefile.in's were out of date if you were using CVS (now fixed). The tarball should be Ok. I take it you did re-build SIP. Phil From phil at river-bank.demon.co.uk Tue Apr 16 20:51:43 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] ANN: SIP/PyQt v3.2rc1 References: <3CBC3E80.BE907E4@river-bank.demon.co.uk> <200204161216.11264.geiseri@yahoo.com> Message-ID: <3CBC80A2.CC011529@river-bank.demon.co.uk> ian reinhart geiser wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 16 April 2002 11:08 am, Phil Thompson wrote: > > v3.2rc1 of SIP and PyQt are available at > > http://www.riverbankcomputing.co.uk/download/snapshots/. > > > > This is mainly a bug fix release... > > > > - indexing a QStringList should work again > > - Windows build issues (hopefully) resolved > > - added the missing QToolTip.enabled() and QToolTip.setEnabled() > > - QThread and friends should now work properly > > > > Because of the thread changes, this version of SIP may introduce some > > incompatibilities for people using handwritten code when wrapping their > > own classes. > > > > I'm particularly interested to know if applications that use the Python > > thread API still work Ok. > > How much will this break when I upgrade if I am not using threads in my > wrapped code? Are there issues with using Python21 instead of 2.2? Thinking about it, existing applications should be fine if you don't make the necessary changes. You also won't have a problem if you are using SIP but not PyQt. The change that's required is to surround all calls to C++ functions in the library being wrapped with Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS. There is a similar requirement for %VirtualCode using SIP_BLOCK_THREADS/SIP_UNBLOCK_THREADS. As usual, the best way to understand this is to study the PyQt code. The main person this is going to affect is Jim with PyKDE. > I know the conversion from 3.0 -> 3.1 messed me up pretty bad with my build > scripts. Do I need to regenerate my bindings? Will the regenerated bindings > break in new and interesting ways? Is there a way to backport the DLL and > the QStringList changes to 3.1 to keep the bugs to a minimum? You will need to regenerate your bindings. Phil From phil at thekompany.com Tue Apr 16 20:54:38 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog" Message-ID: <20020416185633.A6BA53FA9E@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv924 Modified Files: ChangeLog Log Message: Fixed a problem building under Windows. From phil at thekompany.com Tue Apr 16 20:54:46 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] [cvs commit] "sip/siplib siplib.pro" Message-ID: <20020416185633.C12743FA5A@valentine.thekompany.com> Update of /home/cvs/public/sip/siplib In directory valentine:/tmp/cvs-serv924/siplib Modified Files: siplib.pro Log Message: Fixed a problem building under Windows. From geiseri at yahoo.com Tue Apr 16 21:03:54 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] ANN: SIP/PyQt v3.2rc1 In-Reply-To: <3CBC80A2.CC011529@river-bank.demon.co.uk> References: <3CBC3E80.BE907E4@river-bank.demon.co.uk> <200204161216.11264.geiseri@yahoo.com> <3CBC80A2.CC011529@river-bank.demon.co.uk> Message-ID: <200204161503.47532.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 16 April 2002 03:50 pm, Phil Thompson wrote: > ian reinhart geiser wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 [...] > > > > How much will this break when I upgrade if I am not using threads in my > > wrapped code? Are there issues with using Python21 instead of 2.2? > > Thinking about it, existing applications should be fine if you don't > make the necessary changes. You also won't have a problem if you are > using SIP but not PyQt. > Excellent, I am testing now and will report results. I have non PyQt derived bindings and PyQt derived bindings so it should be very easy to locate bugs if there are any left in the QT C module. > The change that's required is to surround all calls to C++ functions in > the library being wrapped with > Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS. There is a similar > requirement for %VirtualCode using > SIP_BLOCK_THREADS/SIP_UNBLOCK_THREADS. As usual, the best way to > understand this is to study the PyQt code. > > The main person this is going to affect is Jim with PyKDE. Hehe, yeah and me in a few days :P I am trying to get some of the KParts/PyKDE stuff in more mainstream use in KDE. Let me tell you its a trip... All Python or All C++ is good, when you start mixing the fun begins... > > > I know the conversion from 3.0 -> 3.1 messed me up pretty bad with my > > build scripts. Do I need to regenerate my bindings? Will the > > regenerated bindings break in new and interesting ways? Is there a way > > to backport the DLL and the QStringList changes to 3.1 to keep the bugs > > to a minimum? > > You will need to regenerate your bindings. Okay I did that, and I included the -D_SIP_MAKE_MODULE_DLL so I should be good to go. Thanks - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vHWTPy62TRm8dvgRAoxTAJ9pC9HP2OOLra3E+bsEd1Ac6TwVowCgkOCm w4cF8CEXwmrcSIg4bdvcz3U= =RPmO -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From geiseri at yahoo.com Tue Apr 16 22:07:39 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] For the sake of documentation: Message-ID: <200204161607.32730.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Greetings, Take note that the following code for Sip 3.2 ... releaseLock: Py_XDECREF(pyRes); sipCondReleaseLock(relLock); return nwritten; ... is now ... releaseLock: Py_XDECREF(pyRes); SIP_UNBLOCK_THREADS return nwritten; ... I could not find this noted anywhere so I decided to make it at least noted in the list archives. cheers - -ian reinhart geiser ////search engine bait//// sipCondRelaseLock releaseLock: ///// -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vISEPy62TRm8dvgRAroyAKCYyV1ql//p94mdpPExek9CAmmD1QCg3gab HHrb3C08LocBGcVdCluUQjM= =5Elo -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From jamesg at xtra.co.nz Wed Apr 17 07:27:35 2002 From: jamesg at xtra.co.nz (James Grant) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] bug in QCanvas bindings. Message-ID: <200204171727.46118.jamesg@xtra.co.nz> Hi, When I was creating QCanvasItems i noticed they were disappearing from the QCanvas when they moved out of scope. When I create a global that references them they stay. I'm guessing the problem has something to do with QCanvasItem and friends missing the /TransferThis/ directive. I've tried recompiling with this on QCanvasItem, QCanvasRectangle etc. But it still doesn't seem to work. Attached is a patch against CVS of what I tried. Any ideas? -- James. -------------- next part -------------- A non-text attachment was scrubbed... Name: qcanvas.patch Type: text/x-diff Size: 1710 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020417/6803f131/qcanvas.bin From jamesg at xtra.co.nz Wed Apr 17 08:13:08 2002 From: jamesg at xtra.co.nz (James Grant) Date: Thu Mar 8 10:26:34 2007 Subject: [PyKDE] bug in QCanvas bindings. In-Reply-To: <200204171727.46118.jamesg@xtra.co.nz> References: <200204171727.46118.jamesg@xtra.co.nz> Message-ID: <200204171813.18597.jamesg@xtra.co.nz> Actually, I missed a few spots /TransferThis/ needed adding, the corrected patch attached to this message fixes the bug. On Wed, 17 Apr 2002 17:27, James Grant wrote: > Hi, > > When I was creating QCanvasItems i noticed they were disappearing from the > QCanvas when they moved out of scope. When I create a global that > references them they stay. > > I'm guessing the problem has something to do with QCanvasItem and friends > missing the /TransferThis/ directive. I've tried recompiling with this on > QCanvasItem, QCanvasRectangle etc. But it still doesn't seem to work. > > Attached is a patch against CVS of what I tried. > > Any ideas? -- James. -------------- next part -------------- A non-text attachment was scrubbed... Name: qcanvas.patch Type: text/x-diff Size: 2214 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020417/c2b93e3d/qcanvas.bin From ejoy at peoplemail.com.cn Wed Apr 17 09:02:48 2002 From: ejoy at peoplemail.com.cn (ejoy) Date: Thu Mar 8 10:26:34 2007 Subject: Fwd: Re: [PyKDE] Re: How can I use SIP to wrap STL class? Message-ID: <200204170702.JAA30628@mail.gmd.de> ---------- Forwarded Message ---------- Subject: Re: [PyKDE] Re: How can I use SIP to wrap STL class? Date: Sun, 14 Apr 2002 20:38:48 -0400 (EDT) From: Donovan Rebbechi To: ejoy Cc: PyKDE Mailing List On Sat, 13 Apr 2002, ejoy wrote: > The compile progress is ok with the following output: > > /usr/local/bin/sip -s ".cpp" -c sip a.sip > cd sip && make > make[1]: Entering directory `/home/zl/prj/py/py/sip' > g++ -c -I.. -I. -I/usr/include/python2.1 -I/usr/local/include/sip > Acmodule.cpp > g++ -c -I.. -I. -I/usr/include/python2.1 -I/usr/local/include/sip > sipAA.cpp g++ -shared -L/usr/local/lib/ -lsip -o libAcmodule.so *.o > make[1]: Leaving directory `/home/zl/prj/py/py/sip' This compile looks incomplete. Sip should generate a source code file for your module, *and* a source code file for each class you define. But you're only compiling the module source code file. It's not linking because you're not compiling everything. PS please forward to the list, it rejects my messages. -- Donovan ------------------------------------------------------- -- Sincerely yours, ejoy From ejoy at peoplemail.com.cn Wed Apr 17 10:05:21 2002 From: ejoy at peoplemail.com.cn (ejoy) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Re: How can I use SIP to wrap STL class? In-Reply-To: References: Message-ID: <200204170805.KAA05757@mail.gmd.de> On Sunday 14 April 2002 21:05, you wrote: > That's an amazingly mangled name! My guess is you're getting the > error because the %Mapped Type code (which will produce > sipConvertTo... and sipConvertFrom... functions) hasn't been > compiled in and linked. I fix the Makefile and the compile progress seems good: g++ -c a.cpp /usr/local/bin/sip -s ".cpp" -c sip a.sip cd sip && make&& python test.py make[1]: Entering directory `/home/zl/prj/py/py/all/sip' g++ -o sip_helper sip_helper.cpp ./sip_helper > sipAVersion.h g++ -c -I.. -I. -I/usr/include/python2.1 -I/usr/local/include/sip Acmodule.cpp g++ -c -I.. -I. -I/usr/include/python2.1 -I/usr/local/include/sip sipAVecString.cpp g++ -c -I.. -I. -I/usr/include/python2.1 -I/usr/local/include/sip sipAA.cpp g++ -shared -L/usr/local/lib/ -lsip -o libAcmodule.so *.o ../a.o make[1]: Leaving directory `/home/zl/prj/py/py/all/sip' but somehow the %ConvertFromType section seems not executed when I lunch test.py. I can not figure out where is the fault.So I pack all the code in attachment and hope someone can help me out. Thanks. -- Sincerely yours, ejoy -------------- next part -------------- A non-text attachment was scrubbed... Name: all.tar.gz Type: application/x-gzip Size: 2271 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020417/0d42a582/all.tar.gz From phil at thekompany.com Wed Apr 17 10:58:34 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog qcanvas.sip" Message-ID: <20020417090035.59A9C3FAA4@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv12726 Modified Files: ChangeLog qcanvas.sip Log Message: Added the missing /TransferThis/ options from all QCanvasItem ctors. Fixed QCanvasItem.setCanvas() to handle acquiring and losing a parent canvas. From john at jrmstudios.com Wed Apr 17 11:38:07 2002 From: john at jrmstudios.com (John R. Marshall) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building PyQT without SGI style In-Reply-To: <3CB8095E.C149347F@river-bank.demon.co.uk> References: <20020408134233.GC21497@strakt.com> <3CB8095E.C149347F@river-bank.demon.co.uk> Message-ID: <200204170438.11290.john@jrmstudios.com> On Saturday 13 April 2002 05:33 am, Phil Thompson wrote: > Fredrik Juhlin wrote: > > > > Hi! > > > > I'm trying to build PyQT but I'm running into trouble. > > > > I've come to the point where I can get it to compile, but when Python > > tries to import the module, I get the error > > "ImportError: /usr/local/lib/python2.2/site-packages/libqtcmodule.so: > > undefined symbol: qt_cast__9QSGIStylePCc". > > > > I'm building PyQT on a Debian machine and found that QT was indeed > > compiled without SGI style support. IS there any way to build PyQT so > > that it doesn't depend on the SGI style? > > If they have missed out classes then they should also have added > #defines to $QTDIR/include/qconfig.h. Try adding... > > #define QT_NO_STYLE_SGI > > ...to that file and re-build PyQt. FYI for Mandrake 8.1/KDE3 users Using Mandrake 8.1 with qt3 from the mandrake packages on the KDE mirrors you need to add #define QT_NO_STYLE_SGI #define QT_NO_STYLE_CDE to qconfig.h -- John R. Marshall - Web Developer JRM Studios - http://www.jrmstudios.com The Hotrodding Network - http://www.hotrodding.net From rengelin at strw.leidenuniv.nl Wed Apr 17 12:05:17 2002 From: rengelin at strw.leidenuniv.nl (Roeland Rengelink) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Problems building PyQt3.1 In-Reply-To: <3CBC384F.1367F60E@river-bank.demon.co.uk> from "Phil Thompson" at Apr 16, 2002 03:42:23 PM Message-ID: <200204171004.g3HA4iv08116@sloten.strw.leidenuniv.nl> > > Roeland Rengelink wrote: > > > > Hi, > > > > I have problems building PyQt-3.1 for Python2.2 and Qt3.0.3 under RH Linux. > > > > Sounds like you have built SIP with Qt support disabled. Check the > output of configure. > This was indeed the case, Thanks for your help Roeland From adalke at mindspring.com Wed Apr 17 14:14:13 2002 From: adalke at mindspring.com (Andrew Dalke) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] context menu in QHeader Message-ID: <037d01c1e5d4$5cd9f560$0201a8c0@josiah.dalkescientific.com> Hello, I'm evaluating the different Python GUI toolkits (Qt, GTK, Tkinter, and wxWindows) for a project I'm working on. I have a set of widgets I'm implementing as test cases. I've been impressed with Qt so far, but I'm stuck right now because I can't figure out how to do a context menu for a column in a QHeader, as part of a QTable. Here's the details of what I'm doing and what I'm looking for. BTW, this is with the most recent everything (Python, free QT/X, sip, PyQT), which I just installed this evening. My first test widget is to show a spreadsheet containing compound data (compounds == small molecules, as for drug research) from a database search. There can be up to a million results in the search. Molecules have many properties - weight, CLogP, total charge, commercial names (which is a list of possible values), CAS # (if available; this is a unique identifier assigned by a third party), etc. Because of the number of compounds, it seems that QGrid is the right widget to use. QListView seems to want me to instantiate an object for each cell, while QGrid allows me to have a single handler for everything, if I read it correctly. I want to show an arbitrary number of columns. The first column always contains the row number. Again, this is easy in a QGrid. The second column contains the molecule, either as a "SMILES" string (which is a unique name determined by the chemical structure) or as a picture of the compound. I can generate the image by writing to a QCanvas. I want to toggle between showing the string and showing the image. I want to do this for the column as a whole, using a context menu on the column header. I can't figure out how to do this. There's a handy contextMenuRequested signal, but that only works for cells. It doesn't work for the horizontal or vertical headers. Nor do the other mouse signals in QTable. If I get the QHeader, it has a 'pressed(int section)' signal, but that doesn't support "context" mouse presses, only "left" button pressed. I find it hard to believe I'm the only one who wants this functionality. I also want people to be able to insert or remove columns from the table, and do so by doing a context click on the header and seeing a popup like Insert mw Insert CLogP Insert --> submenus ------ Delete Using an 'Insert' option adds a new column after the current column and containing the appropriate data (which might be a QComboTableItem for fields containing a list). I first saw this feature on NeXTStep about 8 years ago, so I know it isn't anything new. That all said, how do I support creating a context pop-up menu from the QHeader? Andrew dalke@dalkescientific.com From geiseri at yahoo.com Wed Apr 17 18:50:20 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip/siplib threads.c Makefile.am qtlib.cpp sip.h sipint.h siplib.c" In-Reply-To: <20020416142322.B382E3FA9E@valentine.thekompany.com> References: <20020416142322.B382E3FA9E@valentine.thekompany.com> Message-ID: <200204171250.16632.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 16 April 2002 10:23 am, Phil Thompson wrote: > Replaced all the old thread support with explicit support for classes that > can create new threads. > Removed /ReleaseLock/ - the Python lock is released for any call to C++, > not just selected ones. Actually this breaks embedding of python code that uses bindings generated by sip. We may have to re-think all of the senarios that we are doing this. - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vafIPy62TRm8dvgRAjq+AKCvNMh6hQxlndgIiIMO2Lt22071pQCg1EIu ESya2pDvUr7nwuEwpcVe9ZA= =vE8D -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From boud at valdyas.org Wed Apr 17 20:22:41 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] context menu in QHeader In-Reply-To: <037d01c1e5d4$5cd9f560$0201a8c0@josiah.dalkescientific.com> References: <037d01c1e5d4$5cd9f560$0201a8c0@josiah.dalkescientific.com> Message-ID: <200204172020.57481.boud@valdyas.org> On Wednesday 17 April 2002 07:54, Andrew Dalke wrote: > > That all said, how do I support creating a context pop-up menu from > the QHeader? Right, kids are in bed. I should be studying for my java exam, but anyway. QHeader inherits QWidget, which has a method, mousePressEvent(QEvent ev). You can find out which kind of press occurred, and also the location of the press. From there, it's easy to instantiate and populate a QPopupMenu. Keep in mind that signals/slots are meant for communication between objects. Events are meant for the handling of user input -- key presses, mouse stuff, things like that. Have you seen http://www.opendocspublishing.com/pyqt/index.lxp?lxpwrap=x2629%2ehtm#AEN2679 and http://www.opendocspublishing.com/pyqt/index.lxp?lxpwrap=c1267%2ehtm where I discuss events? In the end, it's very simple... As for the rest: QGrid isn't a widget, but a layout manager, actually. For your purpose, QTable should work best. If you want in-place editing, then QListView might work, too -- it can handle a lot of data, actually. But QTable was designed for large spreadsheet type applications -- the doc speaks of one million by one million cells, which should be ample. More, and your users might get lost. If you mean QGridView instead of QGrid -- that's a possibility, but it isn't easy to use that class. You will have to provide your own painting code, for instance. -- Boudewijn Rempt | http://www.valdyas.org From phil at thekompany.com Wed Apr 17 21:08:10 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog Makefile build.sh qnamespace.sip qprocess.sip qtdocs.sip-in qwindowdefs.sip versions.sip" Message-ID: <20020417191015.A1A2E3FAB6@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv23942 Modified Files: ChangeLog Makefile build.sh qnamespace.sip qprocess.sip qtdocs.sip-in qwindowdefs.sip versions.sip Log Message: Added support for MacOS X (untested). From phil at river-bank.demon.co.uk Wed Apr 17 21:14:36 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] ANN: PyQt v3.2rc1 for MacOS X Message-ID: <3CBDC96C.9F1E44CE@river-bank.demon.co.uk> PyQt v3.2rc1 for MacOS X is available in http://www.riverbankcomputing.co.uk/download/snaphots/. This is completely untested as I don't have the necessary hardware or software. Phil From brad at emerika.com Wed Apr 17 21:30:23 2002 From: brad at emerika.com (Brad Emerson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Bugs? PyQt Message-ID: <3CBDABB7.1090103@emerika.com> I hate to broadcast this, but is there a place to report bugs? Particularly for the Zaurus release? From adalke at mindspring.com Wed Apr 17 21:30:24 2002 From: adalke at mindspring.com (Andrew Dalke) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] context menu in QHeader Message-ID: <000a01c1e643$dfc34c00$0201a8c0@josiah.dalkescientific.com> Boudewijn: (from private email) > have you tried using the event functions of QWidget? You can catch > any mouse event anywhere using them, and then use a QPopupMenu. A-ha, that works. [now list email] > QHeader inherits QWidget, which has a method, mousePressEvent(QEvent ev). > You can find out which kind of press occurred, and also the location > of the press. From there, it's easy to instantiate and populate a > QPopupMenu. I tried that, but mousePressEvent is a virtual method of the QWidget, which (if I understand correctly) means I would need to derive from QHeader to get that call. I tried treating it as a signal, but PyQT complained and wouldn't let me. In a related question, I want the column headers to provide some feedback during mouseover (eg, by having the background become a lighter shade of grey). I tried setting the options that seemed even vaguely relevant, but none worked. It seems I should be able to implement my own paint method to do that, but it again requires that I be able to tell the QTable to use my derived QHeader and not the default one. > Keep in mind that signals/slots are meant for communication between objects. > Events are meant for the handling of user input -- key presses, mouse stuff, > things like that. I (think) I understand. Again, it's only been a couple of days. But since there was a 'contextMenuRequested' event for the cells I figured there would also be a contextMenuRequested signal for the headers, and it appears that there isn't. > Have you seen > http://www.opendocspublishing.com/pyqt/index.lxp?lxpwrap=x2629%2ehtm#AEN2679 ... > where I discuss events? Yes, I have. Indeed, thank you for writing it because that publication is one of the reasons I'm looking more into Qt, since I wouldn't have wanted to figure this all on my own. I think I follow how events work, it's just that I don't know what to do when there isn't the event I'm looking for. For example, I don't recall anything in your book on event filters, nor any example close enough to what I'm working on for me to tweak. > As for the rest: QGrid isn't a widget, but a layout manager, actually. For > your purpose, QTable should work best. My mistake. I just started with Qt a couple days ago and I'm still lost in the maze of different names. I meant to say QTable. Andrew dalke@dalkescientific.com From boud at valdyas.org Wed Apr 17 23:14:31 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] context menu in QHeader In-Reply-To: <000a01c1e643$dfc34c00$0201a8c0@josiah.dalkescientific.com> References: <000a01c1e643$dfc34c00$0201a8c0@josiah.dalkescientific.com> Message-ID: <200204172312.47233.boud@valdyas.org> On Wednesday 17 April 2002 21:12, Andrew Dalke wrote: > Boudewijn: (from private email) > > > have you tried using the event functions of QWidget? You can catch > > any mouse event anywhere using them, and then use a QPopupMenu. > > A-ha, that works. > > [now list email] > > > QHeader inherits QWidget, which has a method, mousePressEvent(QEvent ev). > > You can find out which kind of press occurred, and also the location > > of the press. From there, it's easy to instantiate and populate a > > QPopupMenu. > > I tried that, but mousePressEvent is a virtual method of the QWidget, > which (if I understand correctly) means I would need to derive from > QHeader to get that call. I tried treating it as a signal, but PyQT > complained and wouldn't let me. Yes, I see. You can't subclass QHeader and put your own subclass in QTable. However, I think (not tested, though), that you can subclass QTable, and have QTable catch the mouse events; simple artithmetic will then determine whether the user clicked in the header. There may well be better ways of doing it, but that's what I would try. Working with QTable is still on my todo -- I've got a database app that's built around QListView, and I want to convert it to QTable. But I've not even started... > > In a related question, I want the column headers to provide some > feedback during mouseover (eg, by having the background become a > lighter shade of grey). I tried setting the options that seemed > even vaguely relevant, but none worked. > > It seems I should be able to implement my own paint method to do > that, but it again requires that I be able to tell the QTable to use > my derived QHeader and not the default one. > <...> > I (think) I understand. Again, it's only been a couple of days. But > since there was a 'contextMenuRequested' event for the cells I figured > there would also be a contextMenuRequested signal for the headers, and > it appears that there isn't. > No :-(. It's very sad -- I think that QHeader has reused in the best OO fashion -- having been used previously in QListView, but without much thinking. <...> > > I think I follow how events work, it's just that I don't know what to > do when there isn't the event I'm looking for. For example, I don't > recall anything in your book on event filters, nor any example close > enough to what I'm working on for me to tweak. > Well, they are dealt with, passim, in chapter 15. But they are not really complex beasts: a simple function that's fed events, and decides whether to pass them on, or not. They were especially useful when you wanted a QMultiLineEdit where tab insert \t, instead hopping to the next widget. If you create an object derived from QObject, with a function named eventFilter(self, obj, ev), you can install that object in another QObject, with installEventFilter(self, object). This the eventFilter function of the first object is then called before the events are passed on through the object itself. This might actually be the solution for your problem (untested code alert!): class Filter(QObject): def __init__(self, target, *args): QObject.__init__(*args) self.target = target def eventFilter(self, obj, ev): if obj == self.target: if ev.type() == QEvent.MouseButtonPress: if ev.Button() == Qt.ShiftButton: #or whatever self.emit(PYSIGNAL("contextMenuRequested"), (ev,)) return True return False header = myTable.horizontalHeader() header.installEventFilter(Filter(myTable) On the other hand, it might not work... > > As for the rest: QGrid isn't a widget, but a layout manager, actually. > > For your purpose, QTable should work best. > > My mistake. I just started with Qt a couple days ago and I'm still > lost in the maze of different names. I meant to say QTable. > Good luck! -- Boudewijn Rempt | http://www.valdyas.org From eli.carter at inet.com Wed Apr 17 23:42:57 2002 From: eli.carter at inet.com (Eli Carter) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] QInputDialog.getText and QLineEdit.Password Message-ID: <3CBDEC5C.3010106@inet.com> I found a post on this question here: http://mats.gmd.de/pipermail/pykde/2001-May/001050.html I seem to have the same problem using this: QInputDialog.getText( 'Sensitive Data', 'Password:', QLineEdit.Password ) I'm getting this: TypeError: Argument 3 of QInputDialog.getText() has an invalid type I'm using python + Qt from RedHat 7.2. Is that bug present in that version, or am I doing something wrong? If it's a bug, is there a work-around I can use? TIA, Eli --------------------. "If it ain't broke now, Eli Carter \ it will be soon." -- crypto-gram eli.carter(a)inet.com `------------------------------------------------- From jjl at pobox.com Wed Apr 17 23:43:07 2002 From: jjl at pobox.com (John J. Lee) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] context menu in QHeader In-Reply-To: <000a01c1e643$dfc34c00$0201a8c0@josiah.dalkescientific.com> Message-ID: On Wed, 17 Apr 2002, Andrew Dalke wrote: [...] > In a related question, I want the column headers to provide some > feedback during mouseover (eg, by having the background become a > lighter shade of grey). I tried setting the options that seemed > even vaguely relevant, but none worked. > > It seems I should be able to implement my own paint method to do > that, but it again requires that I be able to tell the QTable to use > my derived QHeader and not the default one. [...] Can't you just respond to the appropriate event by setting the widget background colour? Or is that the method that you're complaining doesn't exist? John From geiseri at yahoo.com Thu Apr 18 02:30:37 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] QObject code breakage Message-ID: <200204172030.35523.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Okay I narrowed this down finally. It looks like the sipConvertToSubClassCode that is there crushes any objects created from a C++ based factory. Since it only knows about PyQt objects any derived ones fail. The issue is that when you pass a pointer from C++ to an embedded Python object it is cast to a QObject if the object has the misfortune of being derived from a QObject. The only other fix is to use MI to confuse SIP enough to leave it alone. It looks like with that code in place all objects created by a factory class get clobbered. I think we should revert the fix, because the old way at least worked. I commented out the sipConvertToSubClassCode sections and now it behaves like it should. Phil what are the chances this could get into 3.2 yet? - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vhOrPy62TRm8dvgRAsQjAJ4tevrAwQscQ+w/MT8uzH5mydRa1QCgkidr gbN9GPM6ditk3dlS7hp8Ipc= =bc3D -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From adalke at mindspring.com Thu Apr 18 08:42:34 2002 From: adalke at mindspring.com (Andrew Dalke) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] context menu in QHeader Message-ID: <013e01c1e6a4$b73651e0$0201a8c0@josiah.dalkescientific.com> Boudewijn Rempt > Yes, I see. You can't subclass QHeader and put your own subclass in QTable. I looked in the back mailing lists at trolltech.com and found that there's about a request every month or two for this feature. > However, I think (not tested, though), that you can subclass QTable, and > have QTable catch the mouse events; simple artithmetic will then determine > whether the user clicked in the header. There may well be better ways of > doing it, but that's what I would try. The subclassed QTable with an event filter on the QHeader worked just fine. Me: > In a related question, I want the column headers to provide some > feedback during mouseover (eg, by having the background become a > lighter shade of grey). I tried setting the options that seemed > even vaguely relevant, but none worked. > > It seems I should be able to implement my own paint method to do > that, but it again requires that I be able to tell the QTable to use > my derived QHeader and not the default one. I'm still trying to figure this one out. It looks like the Qt widgets for the most part don't have mouseover feedback. For example, most of the widgets in designer don't have this, other than some of the icon buttons, and neither do most of the elements in KSpread. Looking around some more, I see there's a "QPalette" which defines color and text styles for different widget states. It only defines it for keyboard focus states, and not for mouse position states. Is it true then that the Qt library doesn't handle mouseover highlighting as a standard part of their widget set? Does anyone else? I note that IE and indeed most of the other MS apps I just tested also don't support mouseover highlighting so this isn't a show stopper, but I thought that context feedback like this was a good idea. Or is it done better with a mouse change? (which I find annoying) Why oh why did I ever think about leaving back-end library development? APIs are so much easier. :) Boudewijn: > Well, [event filters] are dealt with, passim, in chapter 15. ... > They were especially useful when you wanted a QMultiLineEdit where > tab insert \t, instead hopping to the next widget. Right, I think I recall that example now. > This might actually be the solution for your problem (untested code alert!): .. > self.emit(PYSIGNAL("contextMenuRequested"), (ev,)) That should work - I'll give it a go. I'm also using the event fiters to catch paint events in the QHeader, as a way to experiment with providing that mouseover highlighting. The problem is there doesn't seem to be a way to reuse the existing drawing style, so I'll end up writing my own graphics. In this case they are simple enough, but still, I don't want to draw buttons. > Good luck! Thanks! Andrew dalke@dalkescientific.com From boud at valdyas.org Thu Apr 18 08:51:01 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] context menu in QHeader In-Reply-To: <013e01c1e6a4$b73651e0$0201a8c0@josiah.dalkescientific.com> References: <013e01c1e6a4$b73651e0$0201a8c0@josiah.dalkescientific.com> Message-ID: <200204180849.16633.boud@valdyas.org> On Thursday 18 April 2002 08:46, Andrew Dalke wrote: > Boudewijn Rempt > > In a related question, I want the column headers to provide some > > feedback during mouseover (eg, by having the background become a > > lighter shade of grey). I tried setting the options that seemed > > even vaguely relevant, but none worked. > > > > It seems I should be able to implement my own paint method to do > > that, but it again requires that I be able to tell the QTable to use > > my derived QHeader and not the default one. > > I'm still trying to figure this one out. It looks like the Qt > widgets for the most part don't have mouseover feedback. For example, > most of the widgets in designer don't have this, other than some of > the icon buttons, and neither do most of the elements in KSpread. > > Looking around some more, I see there's a "QPalette" which defines > color and text styles for different widget states. It only defines > it for keyboard focus states, and not for mouse position states. > > Is it true then that the Qt library doesn't handle mouseover > highlighting as a standard part of their widget set? Does anyone > else? > I think that's true -- in general. However, it is possible to subclass a QStyle, and make your own widget style in Python. You could dynamically determine which style to subclass, and then only re-implement the painting of QHeader to include mouse-over highlighting. There are KDE styles that have highlighting, for instance if you move the mouse over a button. > Why oh why did I ever think about leaving back-end library > development? APIs are so much easier. :) > GUI work is what I do for a hobby; my living is in coding the kernel of a multi-agent system... -- Boudewijn Rempt | http://www.valdyas.org From phil at river-bank.demon.co.uk Thu Apr 18 11:54:14 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Re: QObject code breakage References: <200204172030.35523.geiseri@yahoo.com> Message-ID: <3CBE978F.1757156D@river-bank.demon.co.uk> ian reinhart geiser wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Okay I narrowed this down finally. It looks like the sipConvertToSubClassCode > that is there crushes any objects created from a C++ based factory. Since it > only knows about PyQt objects any derived ones fail. > > The issue is that when you pass a pointer from C++ to an embedded Python > object it is cast to a QObject if the object has the misfortune of being > derived from a QObject. The only other fix is to use MI to confuse SIP > enough to leave it alone. It looks like with that code in place all objects > created by a factory class get clobbered. I think we should revert the fix, > because the old way at least worked. I commented out the > sipConvertToSubClassCode sections and now it behaves like it should. > > Phil what are the chances this could get into 3.2 yet? Hang on. The old way was changed for you because it didn't do what you wanted. The new way requires you to define %ConvertToSubClassCode for your new classes in your module. Your code will be called before the corresponding QObject code so that it can recognise your classes. As PyQt doesn't use this feature itself, it will not be fully tested - that's up to you. Bland statements that something doesn't work and therefore should be reverted are not helpful. A proper bug report would be. Phil From phil at river-bank.demon.co.uk Thu Apr 18 11:54:47 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] QInputDialog.getText and QLineEdit.Password References: <3CBDEC5C.3010106@inet.com> Message-ID: <3CBE978A.51EDEFA4@river-bank.demon.co.uk> Eli Carter wrote: > > I found a post on this question here: > http://mats.gmd.de/pipermail/pykde/2001-May/001050.html > > I seem to have the same problem using this: > QInputDialog.getText( 'Sensitive Data', 'Password:', QLineEdit.Password ) > I'm getting this: > TypeError: Argument 3 of QInputDialog.getText() has an invalid type > > I'm using python + Qt from RedHat 7.2. Is that bug present in that > version, or am I doing something wrong? > If it's a bug, is there a work-around I can use? What versions are bundled with RedHat? Are they still on Python 1.5.2? I would have hoped that a bug reported a year ago would have been fixed by now. Phil From vvoracha at hotmail.com Thu Apr 18 12:04:41 2002 From: vvoracha at hotmail.com (varunyu vorachart) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] parser in sip Message-ID: I tried to compile sip with 'nmake' on Win2000. I got sip.exe with 2 warnings about yyerror and yylex. I'm not sure if I can ignore these warnings or should do something. ... cl -c -nologo -W3 -O1 -I"." -I"C:\Program Files\Microsoft Visual Studio\ VC98\Include" -Foparser.obj parser.c parser.c /usr/share/bison/bison.simple(406) : warning C4013: 'yyerror' undefined; assuming extern returning int /usr/share/bison/bison.simple(476) : warning C4013: 'yylex' undefined; assuming extern returning int ... Please suggest. Varunyu Vorachart. _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From b.caruso at laposte.net Thu Apr 18 12:22:41 2002 From: b.caruso at laposte.net (caruso bruno) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] I can't compile PyQt under Linux Message-ID: <20020418102238.75F94AB021@postfix1-2.free.fr> Hi! I have some troubles when I compile PyQt (PyQt-3.2rc1-Qt-2.3.1 or the previous version). When compiler enter under pyuic drawing, I have these errors: /bin/sh ../libtool --mode=link g++ -fno-exceptions -O2 -o pyuic -L/usr/local/lib/python2.2/site-packages -L/usr/local/qt/lib uic.o widgetdatabase.o domtool.o -lqt -L/usr/X11R6/lib -lSM -lICE -lX11 -lz g++ -fno-exceptions -O2 -o pyuic uic.o widgetdatabase.o domtool.o -L/usr/local/lib/python2.2/site-packages -L/usr/local/qt/lib -lqt -L/usr/X11R6/lib -lSM -lICE -lX11 -lz uic.o: In function `mkBool(bool)': uic.o(.text+0x18): undefined reference to `QString::QString(char const*)' uic.o: In function `mkBool(QString const&)': uic.o(.text+0x48): undefined reference to `operator==(QString const&, char const*)' uic.o(.text+0x77): undefined reference to `operator==(QString const&, char const*)' uic.o: In function `toBool(QString const&)': uic.o(.text+0xa5): undefined reference to `operator==(QString const&, char const*)' ... domtool.o(.text+0x30d5): undefined reference to `QString::shared_null' domtool.o(.text+0x30e3): undefined reference to `QString::shared_null' domtool.o(.text+0x30f3): undefined reference to `QString::shared_null' collect2: ld returned 1 exit status make: *** [pyuic] Erreur 1 I have many undefined reference to QString, QRegExp and QChar. I use Qt 2.3.1 since a long time under KDE (2.2.2) and there's no any trouble. Qt was compiled with GCC 2.96, SIP-3.2rc1 and PyQt-3.2rc1 with GCC 3.04. If I type nm /usr/local/qt/lib lib*.so |grep QChar for example, I don't find this symbol but something similar like __5QCharc. I could use the RPM package but I prefer to undestand what's happend (if possible). Any idea? Thanks for your answer. Bruno From cavallo at kip.uni-heidelberg.de Thu Apr 18 12:49:49 2002 From: cavallo at kip.uni-heidelberg.de (cavallo@kip.uni-heidelberg.de) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] qtcanvas problems, again Message-ID: I've read all the messages posted in the archive on this mailing list and i cannot figure out why this code doesnt work: import sys import qt import qtcanvas main=qt.QApplication(sys.argv) canvas=qtcanvas.QCanvas(800,600) canvasview=qtcanvas.QCanvasView(canvas) item=qtcanvas.QCanvasEllipse(20,20,canvas) item.setX(50) item.setY(50) item.show() canvasview.show() main.exec_loop() It displays simply a white canvas, but no ellipse: i read that the reason is in the creation/destructuion in the item object but i cannot understand it very much, thanks in advance, antonio cavallo ps. i'm using pyqt 3.1 compiled on a suse 7.3 box From phil at river-bank.demon.co.uk Thu Apr 18 12:55:59 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] parser in sip References: Message-ID: <3CBEA5FA.B5D8C8D@river-bank.demon.co.uk> varunyu vorachart wrote: > > I tried to compile sip with 'nmake' on Win2000. I got sip.exe with 2 > warnings about yyerror and yylex. I'm not sure if I can ignore these > warnings or should do something. > > ... > cl -c -nologo -W3 -O1 -I"." -I"C:\Program Files\Microsoft Visual > Studio\ VC98\Include" -Foparser.obj parser.c parser.c > /usr/share/bison/bison.simple(406) : warning C4013: 'yyerror' undefined; > assuming extern returning int > /usr/share/bison/bison.simple(476) : warning C4013: 'yylex' undefined; > assuming extern returning int > ... You can ignore them. Phil From geiseri at yahoo.com Thu Apr 18 13:03:51 2002 From: geiseri at yahoo.com (ian reinhart geiser) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Re: QObject code breakage In-Reply-To: <3CBE978F.1757156D@river-bank.demon.co.uk> References: <200204172030.35523.geiseri@yahoo.com> <3CBE978F.1757156D@river-bank.demon.co.uk> Message-ID: <200204180703.52360.geiseri@yahoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 18 April 2002 05:53 am, Phil Thompson wrote: > ian reinhart geiser wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Okay I narrowed this down finally. It looks like the > > sipConvertToSubClassCode that is there crushes any objects created from a > > C++ based factory. Since it only knows about PyQt objects any derived > > ones fail. > > > > The issue is that when you pass a pointer from C++ to an embedded Python > > object it is cast to a QObject if the object has the misfortune of being > > derived from a QObject. The only other fix is to use MI to confuse SIP > > enough to leave it alone. It looks like with that code in place all > > objects created by a factory class get clobbered. I think we should > > revert the fix, because the old way at least worked. I commented out the > > sipConvertToSubClassCode sections and now it behaves like it should. > > > > Phil what are the chances this could get into 3.2 yet? > > Hang on. The old way was changed for you because it didn't do what you > wanted. The new way requires you to define %ConvertToSubClassCode for > your new classes in your module. Your code will be called before the > corresponding QObject code so that it can recognize your classes. I was afraid of that, I was looking through the cvs commit logs and my old emails with you and Catalin. It seems that it only effects QObjects so it never was a problem with korelibs. It seems to mangle all of the classes based off of QObjects back to QObjects. If you look at the SIP generated code the arg types are all QObjects and not the correct types. Catalin and I found this out last night, when we where testing some other embedding tests. I think I see what you are trying to do though, the problem that you are having was present in early versions of DCOP. I have to look more at the function, but I think a big problem is the current map has no idea about inheritance. IE if I pass in a pointer from my QMainWindow based main window it will not cast to a QWidget, instead it converts to a QObject. Since this is correct in the eyes of C++ it compiles, but python screams bloody murder because it cannot do widget operations on a QObject. (I put "print parent" in the first line of every arg that had data passed in so I know they all converted to QObjects). > > As PyQt doesn't use this feature itself, it will not be fully tested - > that's up to you. Bland statements that something doesn't work and > therefore should be reverted are not helpful. A proper bug report would > be. Okay, well I tested it, and basicly it does as I said above, it converts all QObject based pointers back to QObjects so the types are all wrong in Python. I would remove the QObject conversion code for now, but drop the sipConvertToSubClassCode. I think I have an idea of how to make it flow more with hiarchy but it will require manual modification to every class that sip touches. Ideally sip should generate some sort of function table that is aware of the inheritance flow. I have to research this more though. For now the only place that needed this code is korelibs, and that is not based off of QObjects, so it dosent benefit from this anyway. I am trying to put together a korelibs example for PyQt so this can be tested for releases. I understand how irritating it is to have to deal with us because we are doing such strange things that really push siplib and pyqt to the limits of what they can do. I have to commend you for fixing the build system bug and threading bugs though. We now have Korelibs loading python based modules as native plugins. Basicly what this means is people can now embed python extentions into C++ without using sip on every module, only their base class. Also there is an untested ability to load C++ modules directly into python without any sip bindings what so ever. This is all exciting stuff. Thanks - -ian reinhart geiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vqgYPy62TRm8dvgRAizzAJ9IP3Y0Zz0nyml/NGYotpOnmvVSEQCaAwFi 7AjoszENu5XRRobE6YLxGGo= =qi+U -----END PGP SIGNATURE----- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From spies at ice.mpg.de Thu Apr 18 13:56:23 2002 From: spies at ice.mpg.de (Noah Spies) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] SegFault at exit using QStatusBar Message-ID: <1019130962.1489.18.camel@gen-24> Hi, I've been attempting to use QStatusBar in my application, and it seems to work just fine, until I quit the application, at which point it seg-faults. Everything else apparently runs perfectly well, and I can see the message in the statusbar. Did I do something wrong? I'm using PyQt/SIP 3.1 and Qt 3.0.3. The code that crashes is included below. Noah #!/usr/bin/env python import sys from qt import * class MainWindow(QWidget): def __init__(self, *args): apply(QWidget.__init__, (self,) + args) self.status_bar = QStatusBar(self) self.status_bar.message("HI!") def run_main(alignment=None): application = QApplication(sys.argv) main_window = MainWindow() main_window.show() application.connect(application, SIGNAL('lastWindowClosed()'), application, SLOT('quit()')) application.exec_loop() if __name__ == "__main__": run_main() From phil at thekompany.com Thu Apr 18 14:07:17 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip/sip parser.y" Message-ID: <20020418120928.A2D973FA5A@valentine.thekompany.com> Update of /home/cvs/public/sip/sip In directory valentine:/tmp/cvs-serv4439/sip Modified Files: parser.y Log Message: configure no longer fails if X11 couldn't be found (for MacOS X). Fixed a bug in the parsing of namespaces. From phil at thekompany.com Thu Apr 18 14:07:26 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog configure configure.ac mkinstalldirs" Message-ID: <20020418120928.79D213FA6D@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv4439 Modified Files: ChangeLog configure configure.ac mkinstalldirs Log Message: configure no longer fails if X11 couldn't be found (for MacOS X). Fixed a bug in the parsing of namespaces. From phil at thekompany.com Thu Apr 18 14:08:31 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt/lib acinclude.m4" Message-ID: <20020418121043.192493FA5A@valentine.thekompany.com> Update of /home/cvs/public/PyQt/lib In directory valentine:/tmp/cvs-serv4469/lib Modified Files: acinclude.m4 Log Message: Updated the NEWS file regarding MacOS X support. qt.py now defined PYQT_VERSION as the PyQt release as a string. configure no longer fails if X11 couldn't be found (for MacOS X). From phil at thekompany.com Thu Apr 18 14:08:32 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog NEWS qtdocs.sip-in qtmod.sip-in" Message-ID: <20020418121042.F40F13FA6D@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv4469 Modified Files: ChangeLog NEWS qtdocs.sip-in qtmod.sip-in Log Message: Updated the NEWS file regarding MacOS X support. qt.py now defined PYQT_VERSION as the PyQt release as a string. configure no longer fails if X11 couldn't be found (for MacOS X). From phil at river-bank.demon.co.uk Thu Apr 18 14:21:21 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] SegFault at exit using QStatusBar References: <1019130962.1489.18.camel@gen-24> Message-ID: <3CBEB9EA.3C055416@river-bank.demon.co.uk> Noah Spies wrote: > > Hi, > I've been attempting to use QStatusBar in my application, and it seems > to work just fine, until I quit the application, at which point it > seg-faults. Everything else apparently runs perfectly well, and I can > see the message in the statusbar. > > Did I do something wrong? I'm using PyQt/SIP 3.1 and Qt 3.0.3. The > code that crashes is included below. > > Noah > > #!/usr/bin/env python > > import sys > from qt import * > > class MainWindow(QWidget): > def __init__(self, *args): > apply(QWidget.__init__, (self,) + args) > > self.status_bar = QStatusBar(self) > self.status_bar.message("HI!") > > def run_main(alignment=None): > application = QApplication(sys.argv) > > main_window = MainWindow() > main_window.show() > > application.connect(application, SIGNAL('lastWindowClosed()'), > application, SLOT('quit()')) > application.exec_loop() > > if __name__ == "__main__": > run_main() Works fine for me with v3.2rc1. Phil From eli.carter at inet.com Thu Apr 18 15:49:52 2002 From: eli.carter at inet.com (Eli Carter) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] QInputDialog.getText and QLineEdit.Password References: <3CBDEC5C.3010106@inet.com> <3CBE978A.51EDEFA4@river-bank.demon.co.uk> Message-ID: <3CBECEF6.6030401@inet.com> Phil Thompson wrote: > Eli Carter wrote: > >>I found a post on this question here: >>http://mats.gmd.de/pipermail/pykde/2001-May/001050.html >> >>I seem to have the same problem using this: >>QInputDialog.getText( 'Sensitive Data', 'Password:', QLineEdit.Password ) >>I'm getting this: >>TypeError: Argument 3 of QInputDialog.getText() has an invalid type >> >>I'm using python + Qt from RedHat 7.2. Is that bug present in that >>version, or am I doing something wrong? >>If it's a bug, is there a work-around I can use? > > > What versions are bundled with RedHat? Are they still on Python 1.5.2? > > I would have hoped that a bug reported a year ago would have been fixed > by now. Thanks for the reply. :) Python 1.5.2-35 and PyQt 2.4-1 Hmm.. the build date for PyQt is Jul 2001, so they had a month I guess... so it probably is the same problem. I didn't find an updated rpm for RedHat. Do you have a workaround (i.e. doesn't require changing the installed version)? TIA, Eli --------------------. "If it ain't broke now, Eli Carter \ it will be soon." -- crypto-gram eli.carter(a)inet.com `------------------------------------------------- From vvoracha at hotmail.com Thu Apr 18 21:42:08 2002 From: vvoracha at hotmail.com (varunyu vorachart) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] parser in sip Message-ID: Thanks for your quick reply, Phil. Then, I try to run sip.exe and I found some problems: First, I try to parse qtmod.sip and find this error: E:\PYQT-3.1\SIP>sip qtmod.sip sip: QListViewItem has not been defined E:\PYQT-3.1\SIP>sip qtglmod.sip sip: QListViewItem has not been defined It seems that sip.exe doesn't include QListViewItem class declaration. Second, I check sip version and get this: E:\PYQT-3.1\SIP>sip -V unknown Is this the related problem due to those warnings or a new kind of problem ? What should I do to solve this ? >From: Phil Thompson >To: varunyu vorachart >CC: pykde@mats.gmd.de >Subject: Re: [PyKDE] parser in sip >Date: Thu, 18 Apr 2002 11:54:50 +0100 > >varunyu vorachart wrote: > > > > I tried to compile sip with 'nmake' on Win2000. I got sip.exe with 2 > > warnings about yyerror and yylex. I'm not sure if I can ignore these > > warnings or should do something. > > > > ... > > cl -c -nologo -W3 -O1 -I"." -I"C:\Program Files\Microsoft Visual > > Studio\ VC98\Include" -Foparser.obj parser.c parser.c > > /usr/share/bison/bison.simple(406) : warning C4013: 'yyerror' undefined; > > assuming extern returning int > > /usr/share/bison/bison.simple(476) : warning C4013: 'yylex' undefined; > > assuming extern returning int > > ... > >You can ignore them. > >Phil > > >_______________________________________________ >PyKDE mailing list PyKDE@mats.gmd.de >http://mats.gmd.de/mailman/listinfo/pykde _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From adalke at mindspring.com Thu Apr 18 22:39:44 2002 From: adalke at mindspring.com (Andrew Dalke) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] strange UI behaviour in QHeader Message-ID: <02b401c1e719$a2528440$0201a8c0@josiah.dalkescientific.com> I realize this is a Qt issue and not a PyQt one, but I figured people here might know the answer. I'm seeing some strange UI behaviour in the QHeader. Here's the reproducible Open 'designer', make a new dialog, and plop down a table. The default table size is 3x3. (This behaviour exists in a stock PyQt QTable as well, so it isn't an issue of the designer.) Press Ctrl-T to test the form, or use the appropriate pulldown. Double-right-click on the seperator between columns 1 and 2. Notice that nothing happens. This is expected. Use the left mouse button to jostle the seperator slightly, in either direction. This shifts the columns, which is expected. Now double-right-click on the seperator between the first two columns. Notice that the first column shrinks to the minimum width needed to display the column text. THIS IS NOT EXPECTED. Either it should always shrink or never shrink -- there's no reason to have to jostle it first. There is a similar behaviour with a double click of the left mouse button on the seperator, with one minor difference. There's no need to jostle the seperator first. You cannot double right click to autosize the seperator unless it has first been moved, while you can do so with the left button. Can someone explain to me why this makes sense or is useful? In the meanwhile, I can eliminate it by filtering out double right clicks on the header. Is there any page on trolltech.com which describes this behaviour, both for left double click and right double click? I couldn't find one. Andrew dalke@dalkescientific.com From phil at thekompany.com Fri Apr 19 01:14:14 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog NEWS" Message-ID: <20020418231629.846173FABE@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv16251 Modified Files: ChangeLog NEWS Log Message: Allow '!' to be applied to platforms. From phil at thekompany.com Fri Apr 19 01:14:23 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip/sip parser.y" Message-ID: <20020418231629.BA62B3FABF@valentine.thekompany.com> Update of /home/cvs/public/sip/sip In directory valentine:/tmp/cvs-serv16251/sip Modified Files: parser.y Log Message: Allow '!' to be applied to platforms. From phil at thekompany.com Fri Apr 19 01:14:51 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog qclipboard.sip qfont.sip qnamespace.sip qprocess.sip qwindowdefs.sip" Message-ID: <20020418231707.DE3E83FABF@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv16255 Modified Files: ChangeLog qclipboard.sip qfont.sip qnamespace.sip qprocess.sip qwindowdefs.sip Log Message: Disabled QFont.dirty(), QClipboard.ownsClipboard(), QClipboard.ownsSelection() and qAppName() for MacOS. From phil at river-bank.demon.co.uk Fri Apr 19 01:15:38 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] parser in sip References: Message-ID: <3CBF535F.50727813@river-bank.demon.co.uk> varunyu vorachart wrote: > > Thanks for your quick reply, Phil. > > Then, I try to run sip.exe and I found some problems: > > First, I try to parse qtmod.sip and find this error: > > E:\PYQT-3.1\SIP>sip qtmod.sip > sip: QListViewItem has not been defined > E:\PYQT-3.1\SIP>sip qtglmod.sip > sip: QListViewItem has not been defined > > It seems that sip.exe doesn't include QListViewItem class declaration. > Second, I check sip version and get this: > > E:\PYQT-3.1\SIP>sip -V > unknown > > Is this the related problem due to those warnings or a new kind of problem ? > What should I do to solve this ? This has been reported before, though I've never seen it myself. I can't for the life of me remember what the problem was. I'd suggest you try the latest 3.2 release candidate in http://www.riverbankcomputing.co.uk/download/snapshots/. Phil From adalke at mindspring.com Fri Apr 19 08:38:15 2002 From: adalke at mindspring.com (Andrew Dalke) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] working code Message-ID: Here's working code for a context menu in the column header of a QTable. All it really does is support right mouse button clicks in the QHeader. Enjoy. Andrew dalke@dalkescientific.com # Experiment with doing a context menu popup in the column headers # Yeah, this is global data. It's an experiment, after all. import random names = ["Andrew", "Brandy", "Cindy", "Dylan", "Ewan", "Fran", "Geoff", "Hernando", "Igor", "Jeremy", "Kelly", "Linda", "Martha"] data = [] for name in names: data.append( { "name": name, "len": len(name), "random": "%3.2f" % random.random(), }) keys = data[0].keys() keys.sort() import sys from qt import * from qttable import * # Convert right mouse button clicks (which is a request for a context # menu for X and MS Windows) into a new signal. class HeaderHandler(QObject): def eventFilter(self, obj, event): if event.type() == QEvent.MouseButtonPress and \ event.button() == QMouseEvent.RightButton: obj.emit(PYSIGNAL("headerContextMenu(int,const QPoint&)"), (obj.sectionAt(event.x()), event.globalPos())) return 1 return 0 class DataTable(QTable): def __init__(self, *args): QTable.__init__(self, *args) self.rows = data self.insertRows(0, len(self.rows)) self.header_handler = HeaderHandler(self) self.horizontalHeader().installEventFilter(self.header_handler) self.setColumnMovingEnabled(1) self.insertColumnAt("name", 0) QObject.connect(self, SIGNAL("contextMenuRequested(int,int,const QPoint&)"), self.contextMenuRequested) QObject.connect(self.horizontalHeader(), PYSIGNAL("headerContextMenu(int,const QPoint&)"), self.headerContextMenu) def headerContextMenu(self, orig_colno, pos): colno = orig_colno if colno == -1: colno = self.numCols() - 1 menu = QPopupMenu() # Need to keep an extra reference to the lambda function, # since PyQt doesn't. funcs = [] for key in keys: f = lambda id, key=key:self.insertColumnAt(key, colno + 1) funcs.append(f) menu.insertItem("Insert " + key, f) menu.insertSeparator() f = lambda id: self.removeColumn(colno) funcs.append(f) menu.insertItem("Delete", f, 0, 100) # Check if the mouse button was not on any column if orig_colno == -1: menu.setItemEnabled(100, 0) menu.setMouseTracking(1) menu.exec_loop(pos) def contextMenuRequested(self, row, col, pos): print "contextMenuRequested", row, col, pos.x(), pos.y() def insertColumnAt(self, name, col = 0): assert col >= 0, col self.insertColumns(col) self.horizontalHeader().setLabel(col, name) for row, data in zip(range(len(self.rows)), self.rows): self.setText(row, col, str(data[name])) if __name__ == '__main__': a = QApplication(sys.argv) w = DataTable() w.setCaption("Blah blah") a.setMainWidget(w) w.show() a.exec_loop() From rjones at ekit-inc.com Fri Apr 19 09:17:36 2002 From: rjones at ekit-inc.com (Richard Jones) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building pykde on redhat? Message-ID: <200204191717.24024.rjones@ekit-inc.com> I've got a rh7.2 system with the KDE3 RPMs (kdelibs-3.0.0-4, qt-3.0.3-5 and friends) installed. I'm not really sure if KDE3 is supported. I'm not getting that far... The INSTALL file says "PyKDE2 requires Qt2.3.x and KDE2.1.x" ... is there a PyKDE3? (there doesn't appear to be a CVS module for it) I'm having a bugger of a time getting PyKDE to compile from CVS. I've run into a sip problem - I have sip 3.1 (sip-3.1-1) installed. My Makefile has been modified to let it copy the extraH directory: [outpost:~/src/kde/PyKDE2]$ cvs diff Makefile Index: Makefile =================================================================== RCS file: /home/cvs/public/PyKDE2/Makefile,v retrieving revision 1.1.1.5 diff -u -3 -p -r1.1.1.5 Makefile --- Makefile 11 Feb 2002 07:59:54 -0000 1.1.1.5 +++ Makefile 19 Apr 2002 07:13:55 -0000 @@ -64,7 +64,7 @@ init: mkdir $(TESTDIR) mkdir $(EXTRAHDIR) cp test/*.py $(TESTDIR) - cp extraH/* $(EXTRAHDIR) + cp extraH/*.h $(EXTRAHDIR) dcop: dcop.sip mkdir $(DCOP) The error I get is: [outpost:~/src/kde/PyKDE2]$ make QTSIPDIR=/usr/share/sip/qt/ rm -rf PyKDE2 kde.sip dcop.sip kdecore.sip kdeui.sip kio.sip kfilemod.sip kparts.sip kjsmod.sip khtml.sip kspellmod.sip\ PyKDE2-3.0alpha3.tar.gz mkdir PyKDE2 cp NEWS PyKDE2 cp postproc PyKDE2 cp lib/Makefile.am PyKDE2 cp lib/README PyKDE2 cp lib/AUTHORS PyKDE2 cp lib/INSTALL PyKDE2 cp lib/ChangeLog PyKDE2 cp lib/THANKS PyKDE2 cp lib/COPYING PyKDE2 cp lib/acinclude.m4 PyKDE2 sed -e s/@RELEASE@/3.0alpha3/g lib/configure.in.in >PyKDE2/configure.in sed -e s/@RELEASE@/3.0alpha3/g -e s/@VERSION@/3.0alpha3/g lib/PyKDE.spec.in >PyKDE2/PyKDE.spec mkdir PyKDE2/test mkdir PyKDE2/extraH cp test/*.py PyKDE2/test cp extraH/*.h PyKDE2/extraH sed -e s/@RELEASE@/3.0alpha3/g -e s/@VERSION@/3.0alpha3/g dcop.sip-in >dcop.sip mkdir PyKDE2/dcop sip -t Qt_2_3_0 -t KDE_2_1_1 -I /usr/share/sip/qt/ -c PyKDE2/dcop -m PyKDE2/dcop/Makefile.am dcop.sip sip: dcop.sip:40: parse error make: *** [dcop] Error 1 I've attached dcop.sip. Fingers crossed... Richard -------------- next part -------------- //Copyright (c) 2001 Jim Bublitz //### Generated by preSip ### %Copying Terms and Conditions Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the copyright holder. %End %Module dcop %Timeline { KDE_0_0_0 KDE_0_0_1 KDE_2_1_1 KDE_2_1_2 KDE_2_2_0 } %Import qtmod.sip %VersionCode #define KDE_VERSION 211 #define KDE_VERSION_STRING "2.1.1" %End %ExportedDoc <Literal>dcop</Literal> Module Reference %End // Include the interface definitions for each class. %Include dcopclient.sip %Include dcopobject.sip %Include dcopref.sip //%Include dcopsignals.sip %Include dcopstub.sip %ExportedDoc %End // Give the Python code access to the Qt version. %PrePythonCode from qt import QT_VERSION %End // Tailor the Makefile.am. %Makefile Makefile.am .o # Copyright (c) 2000 Phil Thompson (phil@river-bank.demon.co.uk) #//Copyright (c) 2001 Jim Bublitz # # Makefile for building dcop with autoconf/automake/libtool. DCOP_SOURCES = \ $S \ dcop.py noinst_PROGRAMS = sip_helper sip_helper_SOURCES = sip_helper$c sipdcopDecldcop.h: sipdcopVersion.h sipdcopVersion.h: sip_helper ./sip_helper >sipdcopVersion.h dcopcmodule.cpp: sipdcopProxydcop.moc sipdcopProxydcop.moc: sipdcopProxydcop.h sipdcopVersion.h $$(CXXCPP) $$(SIP_CPPFLAGS) -o moc_sipdcopProxydcop.h sipdcopProxydcop.h $$(SIP_MOC) -o sipdcopProxydcop.moc moc_sipdcopProxydcop.h $$(PYTHONINTERP) ../postproc -p ./ -o qtNoTr moc_sipdcopProxydcop.h CLEANFILES = \ dcop.pyc sip_helper sipdcopVersion.h sipdcopProxydcop.moc \ moc_sipdcopProxydcop.h AM_CPPFLAGS = $$(SIP_CPPFLAGS) AM_CXXFLAGS = $$(SIP_CXXFLAGS) -I ../extraH libdir = $$(SIP_PYTHONDLMODULES) datadir = $$(SIP_PYTHONMODULES) data_DATA = dcop.py lib_LTLIBRARIES = libdcopcmodule.la libdcopcmodule_la_SOURCES = $$(DCOP_SOURCES) libdcopcmodule_la_LDFLAGS = -release 3.0alpha3 libdcopcmodule_la_LIBADD = -L$$(libdir) -lqtcmodule $$(SIP_LDLIBDIRS) -lsip -lqt -lDCOP $$(SIP_LDXFLAGS) install-data-hook: (cd /tmp; PYTHONPATH=$$(DESTDIR)$$(datadir):$$(DESTDIR)$$(libdir) $$(PYTHONINTERP) -c "import dcop") %End From phil at river-bank.demon.co.uk Fri Apr 19 11:18:41 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] QInputDialog.getText and QLineEdit.Password References: <3CBDEC5C.3010106@inet.com> <3CBE978A.51EDEFA4@river-bank.demon.co.uk> <3CBECEF6.6030401@inet.com> Message-ID: <3CBFE09B.3A9937B5@river-bank.demon.co.uk> Eli Carter wrote: > > Phil Thompson wrote: > > Eli Carter wrote: > > > >>I found a post on this question here: > >>http://mats.gmd.de/pipermail/pykde/2001-May/001050.html > >> > >>I seem to have the same problem using this: > >>QInputDialog.getText( 'Sensitive Data', 'Password:', QLineEdit.Password ) > >>I'm getting this: > >>TypeError: Argument 3 of QInputDialog.getText() has an invalid type > >> > >>I'm using python + Qt from RedHat 7.2. Is that bug present in that > >>version, or am I doing something wrong? > >>If it's a bug, is there a work-around I can use? > > > > > > What versions are bundled with RedHat? Are they still on Python 1.5.2? > > > > I would have hoped that a bug reported a year ago would have been fixed > > by now. > > Thanks for the reply. :) > > Python 1.5.2-35 and PyQt 2.4-1 > Hmm.. the build date for PyQt is Jul 2001, so they had a month I guess... > so it probably is the same problem. I didn't find an updated rpm for > RedHat. > Do you have a workaround (i.e. doesn't require changing the installed > version)? The problem (now that I've looked it up) was that one of the getText() variants was simply missing. So the workaround is not to use that variant. Phil From phil at river-bank.demon.co.uk Fri Apr 19 11:56:57 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] ANN: SIP/PyQt v3.2rc2 for UNIX/Windows/MacOS Message-ID: <3CBFE9B1.8059DE83@river-bank.demon.co.uk> v3.2rc2 is available for download at http://www.riverbankcomputing.co.uk/download/snapshots/. The main differences between rc2 and rc1 is better MacOS support. I've gone about as far as I can with this without being able to compile the thing myself. I'd *really* appreciate it if somebody using MacOS could write some installation notes based on rc2 describing the additional stages needed to build SIP and PyQt on that platform. I expect that this will be the last release before v3.2 proper. Phil From papadopo at .shfj.cea.DECOY.fr Fri Apr 19 13:14:21 2002 From: papadopo at .shfj.cea.DECOY.fr (Dimitri Papadopoulos) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP + PyQt on Mac OS X Message-ID: <3CBFEAAD.98A0EE8D@REMOVE.shfj.DECOY.cea.fr> Hi, For those interested, this describes how to build SIP+PyQt on Mac OS X using the following: Mac OS X 10.1.3 I understand 10.1 is suggested by Trolltech: http://www.trolltech.com/developer/platforms/osx.html SIP 3.2rc1 http://www.riverbankcomputing.co.uk/download/snapshots/sip-3.2rc1.tar.gz Note that SIP 3.1 has a minor bug that results in a linker error, this bug is fixed in SIP 3.2rc1. PyQt 3.2rc1 for Mac OS X http://www.riverbankcomputing.co.uk/download/snapshots/PyQt-3.2rc1-Qt-3.0.2-MacX.tar.gz Note that PyQt 3.1 does not disable some X11-only functions, PyQt 3.2rc1 does so I suggest you use it. Qt/Mac evaluation version http://www.trolltech.com/products/qt/evaluate.html Python for Mac OS X http://fink.sourceforge.net/pdb/package.php/python There are two versions of Python for Mac OS X: * the above Python for Mac OS X which can be run from the command line * the traditional MacPython that knows nothing of command lines and UNIX Because MacPython cannot be called from the command line and I couldn't even identify a Python executable, and because PyQt requires the Python executable to be indetified using the --with-python=FILE option, we were not able to configure PyQt with MacPython. I suggest you use Python for Mac OS X from Fink instead. See also paragraph "MacOS X command-line interpreter" on this page: http://www.cwi.nl/~jack/macpython.html Now, supposing you have Python for Mac OS X and Qt/Mac already installed: 1) Building SIP: Mac OS makes a distinction between modules and shared libraries: http://fink.sourceforge.net/doc/porting/shared.php In short: * shared libraries are named libfoo.dylib, while modules can be named whatever (like on most systems) and are usually named libfoo.so in software ported from UNIX. * shared libraries are linked using the compiler option -dynamiclib while modules ("bundles" in Mac OS terminology) are linker using the compiler option -bundle So we had to change manually the linking command line from: c++ -dynamiclib -flat_namespace [...] -install_name /sw/lib/python2.2/site-packages/libsip.9.dylib -compatibility_version 10 -current_version 10 to: c++ -bundle -flat_namespace [...] -install_name /sw/lib/python2.2/site-packages/libsip.9.dylib -compatibility_version 10 -current_version 10.0 Either manually modify the libtool script in the root directory, or run the above command line manually. Then the resulting module is named libsip.dylib, but Python expects its modules to be named lib.so, so either symlink libsip.dylib to libsip.so or copy or move it. 2) Building PyQt: This is pretty straightforward. There is one single problem. The following functions are declared in the Qt headers but are missing from the Qt library libqt-mt.dylib: QFont::dirty() QClipboard::ownsClipboard() QClipboard::ownsSelection() qAppName() This will result in linker errors. You'll have to comment out these functions in the respective qt/sipqtQ.cpp file. That's it. Dimitri From terry at beam.demon.co.uk Fri Apr 19 14:07:54 2002 From: terry at beam.demon.co.uk (Terry Barnaby) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Problem with QTable and QTableItem with PyQT-2.4 and PyQT-3.1 Message-ID: <3CC00897.E7C39D08@beam.demon.co.uk> Hi, I am trying to use the QTable and QTableItem classes and seem to have a problem. If I use setText() to create a table cell it works fine. If however I create the QTableItem() manually (In the same way as the C++ version of setText() does it) and add the item using setItem() there is no text displayed in the cell. Creating a C++ version of the code works fine. t = QTable(5, 10, s) t.show() t.setText(0, 0, "Hello"); i = QTableItem(t, QTableItem.OnTyping, "HH", QPixmap()); print "Item:", i, i.text(); t.setItem(0, 1, i); Any ideas ? I enclose the code that fails. We are using RedHat 7.2, Python 1.5 and Python 2.1 with QT 2.3.1. Cheers Terry -- Dr Terry Barnaby BEAM Ltd Phone: +44 1454 324512 Northavon Business Center, Dean Rd Fax: +44 1454 313172 Yate, Bristol, BS37 5NH, UK Email: terry@beam.demon.co.uk Web: www.beam.demon.co.uk BEAM for: Visually Impaired X-Terminals, Parallel Processing, Software Dev "Tandems are twice the fun !" From thorsten at mats.gmd.de Fri Apr 19 15:37:27 2002 From: thorsten at mats.gmd.de (Thorsten Horstmann) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] server update Message-ID: <3CC01D45.D1940C39@mats.gmd.de> Hi, this sunday we will install our new server machine. The good old SUN Ultra Enterprise 3000 has disused *sniff* Therefore the mailing list will be unreachable for some hours in the morning. I use this situation to upgrade mailman as well. -Thorsten Horstmann From eli.carter at inet.com Fri Apr 19 15:37:50 2002 From: eli.carter at inet.com (Eli Carter) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] QInputDialog.getText and QLineEdit.Password References: <3CBDEC5C.3010106@inet.com> <3CBE978A.51EDEFA4@river-bank.demon.co.uk> <3CBECEF6.6030401@inet.com> <3CBFE09B.3A9937B5@river-bank.demon.co.uk> Message-ID: <3CC01DA1.5050901@inet.com> Phil Thompson wrote: >>>Eli Carter wrote: >>>>I found a post on this question here: >>>>http://mats.gmd.de/pipermail/pykde/2001-May/001050.html >>>> >>>>I seem to have the same problem using this: >>>>QInputDialog.getText( 'Sensitive Data', 'Password:', QLineEdit.Password ) >>>>I'm getting this: >>>>TypeError: Argument 3 of QInputDialog.getText() has an invalid type >>>> [snip] > The problem (now that I've looked it up) was that one of the getText() > variants was simply missing. So the workaround is not to use that > variant. Bummer. Ok; I've found another way of accomplishing what I need to without using getText(). Thanks again for your help! Eli --------------------. "If it ain't broke now, Eli Carter \ it will be soon." -- crypto-gram eli.carter(a)inet.com `------------------------------------------------- From jbublitz at nwinternet.com Fri Apr 19 17:20:08 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Re: Building pykde on redhat? In-Reply-To: <200204190717.JAA15824@mats.gmd.de> Message-ID: On 19-Apr-02 wrote: > I've got a rh7.2 system with the KDE3 RPMs (kdelibs-3.0.0-4, > qt-3.0.3-5 and friends) installed. I'm not really sure if KDE3 > is supported. I'm not getting that far... The INSTALL file says > "PyKDE2 requires Qt2.3.x and KDE2.1.x" ... is there a PyKDE3? > (there doesn't appear to be a CVS module for it) > I'm having a bugger of a time getting PyKDE to compile from CVS. > I've run into a sip problem - I have sip 3.1 (sip-3.1-1) > installed. My Makefile has been modified to let it copy the > extraH directory: > sip: dcop.sip:40: parse error I think this is the "ImportWithTimeline" vs "Import" change in sip (without looking at the original code and noting you had "%Import qtmod.sip" in your sample). This is kind of a mess - I'll only apologize once here, as some people complain I apologize too much :) The problems are: 1. The beta1 release of PyKDE2 only goes as far as KDE3.0beta2 and there are incompatible changes in the KDE3.0 final release that you have. 2. The beta1 release of PyKDE2 only builds with sip3.0 3. The INSTALL file is wrong (thought I updated all of that - guess not) 4. RH7.2 uses gcc2.96, which causes a few problems and also catches a few bugs that gcc2.95 misses. 5. There is a small one-line bug in sip3.1 (the fix was posted by Phil today) which creams PyKDE2 So, in short, you're screwed until I get the next release out which will a) support KDE3.0 final; b) use sip3.2 (probably by the time I get it done); c) have fixes for gcc2.96 (thanks to Bill Soudan); and d) have the INSTALL file fixed. I forgot to mention there are also changes in the linking procedure, but those will be fixed too. Sorry (there I go again) - the release is a week or two off (I'm shooting for the end of next week but want to have it tested on RH before releasing it) and will solve all of your problems (well, at least the ones you listed here) ... hopefully. I do want to encourage people to dig into the code and bug hunt as you've done - it's a great help, but in this case there's obviously a lot of updating required on this end. Jim From jbublitz at nwinternet.com Fri Apr 19 18:21:34 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Re: How can I use SIP to wrap STL In-Reply-To: <200204171000.MAA16143@mats.gmd.de> Message-ID: On 17-Apr-02 ejoy wrote: > I fix the Makefile and the compile progress seems good: > but somehow the %ConvertFromType section seems not executed when > I lunch test.py. > I can not figure out where is the fault.So I pack all the code in > attachment and hope someone can help me out. Sorry I couldn't respond sooner. As I pointed out in my original response, if you want to pass a parameter by reference ('d' in your example) like this: a.foo(s,d) and use the modified value of 'd' in Python, you will either need to write %MemberCode for 'foo' so that 'd' is the return value of 'foo' in Python: d = a.foo(s, d) [1] or rewrite 'foo' to return 'd' instead: d = a.foo(s) [2] For [1] you will have to insert code in the sip file to have 'foo' return 'd'(grep PyQt or PyKDE2 for %MemberCode and look at the examples there - even if the C++ 'foo' returns 'void', you can cause it to return whatever type 'd' is to Python). For [2], sip will generate the code automatically but you'll have to rewrite your C++ to return 'd' instead of void. You're correct that in [1], the %ConvertFromType code will never execute. [2] is much easier if you control the C++ code you're writing bindings for. Jim From humbert at hagen.de Fri Apr 19 20:02:24 2002 From: humbert at hagen.de (Ludger Humbert) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP + PyQt on Mac OS X References: <3CBFEAAD.98A0EE8D@REMOVE.shfj.DECOY.cea.fr> Message-ID: <3CC05BA0.6010105@hagen.de> Dimitri Papadopoulos wrote: > Hi, > > For those interested, this describes how to build SIP+PyQt on > Mac OS X using the following: following is a step by step way to configure/make sip and PyQt In the meantime I succeded in installed sip. The solution to compile and link sip -- the actual version: http://www.riverbankcomputing.co.uk/download/snapshots/sip-3.2rc2.tar.gz worked quite fine. TNX for this. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ configure for PyQt works too. But while make'ing there occured several errors : ... Making all in qt make[2]: Entering directory `/Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qt' c++ -E -I/sw/include/python2.2 -I/sw/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -I.. sipqtProxyqt.h >moc_sipqtProxyqt.h sipqtProxyqt.h:39: undefined type, found `class' sipqtProxyqt.h:39: illegal external declaration, missing `;' after `sipProxyqt' sipqtProxyqt.h:39: undefined type, found `public' sipqtProxyqt.h:39: illegal external declaration, missing `;' after `sipProxy' sipqtProxyqt.h:41: undefined type, found `Q_OBJECT' sipqtProxyqt.h:43: illegal external declaration, missing `;' after `public' sipqtProxyqt.h:46: undefined type, found `public' sipqtProxyqt.h:46: illegal external declaration, missing `;' after `slots' sipqtProxyqt.h:48: undefined type, found `QAction' sipqtProxyqt.h:50: syntax error, found `&' ... (the same for all Q*Item ...) sipqtProxyqt.h:111: syntax error, found `&' sipqtProxyqt.h:111: illegal function definition, found `)' sipqtProxyqt.h:114: syntax error, found `&' sipqtProxyqt.h:114: illegal function definition, found `)' sipqtProxyqt.h:115: undefined type, found `QWidget' sipqtProxyqt.h:116: undefined type, found `QObject' cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode /sw/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h ... the linking process ended errornous with: c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/sw/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c sipqtQThread.cpp -fno-common -DPIC -o sipqtQThread.lo sipqtQThread.cpp: In function `struct PyObject * sipDo_QThread_currentThread(PyObject *, PyObject *)': sipqtQThread.cpp:157: assignment to `void *' from `long unsigned int' lacks a cast make[2]: *** [sipqtQThread.lo] Error 1 make[2]: Leaving directory `/Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qt' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2' make: *** [all] Error 2 Any hints? Ludger From tonyc at bellsouth.net Sat Apr 20 00:10:30 2002 From: tonyc at bellsouth.net (Tony Corrente) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Table Signals Message-ID: <1019253972.2147.24.camel@localhost> Hello, I'm using PyQt-3.1 I'm very new to using PyQt and I'm having problems with tables and signals.. The signals from all the other widgets I've tried seem to work. Using designer, I've created a simple table named Table1. The name of the form is BrowseForm. I get the following error when i run the code. QObject::connect: No such slot QMainWindow::Table1_clicked(int,int,int,const QPoint&) QObject::connect: (sender name: 'Table1') QObject::connect: (receiver name: 'BrowseForm') This happens with any signal I try to add from a TABLE Using designer, I add a Signal Handler clicked(int,int,int,const QPoint&) . Save the file. The browse.ui code contains Table1 clicked(int,int,int,const QPoint&) BrowseForm Table1_clicked(int,int,int,const QPoint&) I then gererate the py with pyuic -o browse.py -x browse.ui The file browse.py contains self.connect(self.Table1,SIGNAL("clicked(int,int,int,const QPoint&)"),self,SLOT("Table1_clicked(int,int,int,const QPoint&)")) and def Table1_clicked(self,a0,a1,a2,a3): print "BrowseForm.Table1_clicked(int, int, int, const QPoint&): Not implemented yet" When i run python browse.py I get the error QObject::connect: No such slot QMainWindow::Table1_clicked(int,int,int,const QPoint&) QObject::connect: (sender name: 'Table1') QObject::connect: (receiver name: 'BrowseForm') Any help or ideas, or am I doing this all wrong ???? Thanks TC -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020420/5967efec/attachment.html From adalke at mindspring.com Sat Apr 20 01:58:45 2002 From: adalke at mindspring.com (Andrew Dalke) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Problem with QTable and QTableItem with PyQT-2.4 and PyQT-3.1 Message-ID: Terry Barnaby: > I am trying to use the QTable and QTableItem classes and seem to > have a problem. Hmm. This works fine for me under 3.0.3. >>> from qt import * >>> from qttable import * >>> app = QApplication([]) >>> t = QTable(5, 10) >>> t.show() >>> t.setText(0, 0, "Hello") >>> i = QTableItem(t, QTableItem.OnTyping, "HH", QPixmap()) >>> print i.text() HH >>> t.setItem(0, 1, i) >>> app.exec_loop() Andrew From phil at river-bank.demon.co.uk Sat Apr 20 06:05:36 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] I can't compile PyQt under Linux References: <20020418102238.75F94AB021@postfix1-2.free.fr> Message-ID: <3CBEA608.E28D9DE4@river-bank.demon.co.uk> caruso bruno wrote: > > Hi! > > I have some troubles when I compile PyQt (PyQt-3.2rc1-Qt-2.3.1 or the > previous version). When compiler enter under pyuic drawing, I have these > errors: > > /bin/sh ../libtool --mode=link g++ -fno-exceptions -O2 -o pyuic > -L/usr/local/lib/python2.2/site-packages -L/usr/local/qt/lib uic.o > widgetdatabase.o domtool.o -lqt -L/usr/X11R6/lib -lSM -lICE -lX11 -lz > g++ -fno-exceptions -O2 -o pyuic uic.o widgetdatabase.o domtool.o > -L/usr/local/lib/python2.2/site-packages -L/usr/local/qt/lib -lqt > -L/usr/X11R6/lib -lSM -lICE -lX11 -lz > uic.o: In function `mkBool(bool)': > uic.o(.text+0x18): undefined reference to `QString::QString(char const*)' > uic.o: In function `mkBool(QString const&)': > uic.o(.text+0x48): undefined reference to `operator==(QString const&, char > const*)' > uic.o(.text+0x77): undefined reference to `operator==(QString const&, char > const*)' > uic.o: In function `toBool(QString const&)': > uic.o(.text+0xa5): undefined reference to `operator==(QString const&, char > const*)' > ... > domtool.o(.text+0x30d5): undefined reference to `QString::shared_null' > domtool.o(.text+0x30e3): undefined reference to `QString::shared_null' > domtool.o(.text+0x30f3): undefined reference to `QString::shared_null' > collect2: ld returned 1 exit status > make: *** [pyuic] Erreur 1 > > I have many undefined reference to QString, QRegExp and QChar. I use Qt 2.3.1 > since a long time under KDE (2.2.2) and there's no any trouble. Qt was > compiled with GCC 2.96, SIP-3.2rc1 and PyQt-3.2rc1 with GCC 3.04. If I type > nm /usr/local/qt/lib lib*.so |grep QChar for example, I don't find this > symbol but something similar like __5QCharc. I could use the RPM package but > I prefer to undestand what's happend (if possible). Any idea? Mixing libraries compiled with different versions of g++ is usually a bad idea because the name mangling rules seem to change between each version. Phil From phil at river-bank.demon.co.uk Sat Apr 20 18:45:29 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Problem with QTable and QTableItem with PyQT-2.4 and PyQT-3.1 References: <3CC00897.E7C39D08@beam.demon.co.uk> <3CC01FB5.41A436CD@river-bank.demon.co.uk> <3CC0255A.E93CC130@beam.demon.co.uk> Message-ID: <3CC19053.76FB14E3@river-bank.demon.co.uk> Terry Barnaby wrote: > > > Hi, > > > > > > I am trying to use the QTable and QTableItem classes and seem to have a problem. > > > If I use setText() to create a table cell it works fine. > > > If however I create the QTableItem() manually (In the same way as the C++ version > > > of setText() does it) and add the item using setItem() there is no text displayed > > > in the cell. Creating a C++ version of the code works fine. > > > > > > t = QTable(5, 10, s) > > > t.show() > > > > > > t.setText(0, 0, "Hello"); > > > i = QTableItem(t, QTableItem.OnTyping, "HH", QPixmap()); > > > print "Item:", i, i.text(); > > > t.setItem(0, 1, i); > > > > > > Any ideas ? > > > I enclose the code that fails. > > > We are using RedHat 7.2, Python 1.5 and Python 2.1 with QT 2.3.1. It's a bug. It will be fixed in v3.2. Phil From phil at thekompany.com Sun Apr 21 00:40:41 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog qtable.sip" Message-ID: <20020420224313.CB6313FB03@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv25320 Modified Files: ChangeLog qtable.sip Log Message: Convert instances of the internal class QTableHeader to QHeader. Fixed a bug in pyuic for Qt3 relating to the format of slot signatures. From phil at thekompany.com Sun Apr 21 00:40:49 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt/pyuic3 form.cpp" Message-ID: <20020420224313.E5E653FB02@valentine.thekompany.com> Update of /home/cvs/public/PyQt/pyuic3 In directory valentine:/tmp/cvs-serv25320/pyuic3 Modified Files: form.cpp Log Message: Convert instances of the internal class QTableHeader to QHeader. Fixed a bug in pyuic for Qt3 relating to the format of slot signatures. From phil at river-bank.demon.co.uk Sun Apr 21 00:44:21 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Table Signals References: <1019253972.2147.24.camel@localhost> Message-ID: <3CC1EF02.D6888188@river-bank.demon.co.uk> > Tony Corrente wrote: > > Hello, > > I'm using PyQt-3.1 > I'm very new to using PyQt and I'm having problems with tables and > signals.. > The signals from all the other widgets I've tried seem to work. > > Using designer, I've created a simple table named Table1. > The name of the form is BrowseForm. > I get the following error when i run the code. > > QObject::connect: No such slot > QMainWindow::Table1_clicked(int,int,int,const QPoint&) > QObject::connect: (sender name: 'Table1') > QObject::connect: (receiver name: 'BrowseForm') > > This happens with any signal I try to add from a TABLE > > Using designer, I add a Signal Handler clicked(int,int,int,const > QPoint&) . > Save the file. > The browse.ui code contains > > Table1 > clicked(int,int,int,const QPoint&) > BrowseForm > Table1_clicked(int,int,int,const QPoint&) > > > I then gererate the py with > pyuic -o browse.py -x browse.ui > > The file browse.py contains > self.connect(self.Table1,SIGNAL("clicked(int,int,int,const > QPoint&)"),self,SLOT("Table1_clicked(int,int,int,const QPoint&)")) > and > def Table1_clicked(self,a0,a1,a2,a3): > print "BrowseForm.Table1_clicked(int, int, int, const QPoint&): > Not implemented yet" > > When i run python browse.py I get the error > > QObject::connect: No such slot > QMainWindow::Table1_clicked(int,int,int,const QPoint&) > QObject::connect: (sender name: 'Table1') > QObject::connect: (receiver name: 'BrowseForm') > > Any help or ideas, or am I doing this all wrong ???? It's a bug in pyuic. The fix is now in CVS. v3.2 will be released in a few days. Phil From phil at thekompany.com Sun Apr 21 21:06:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip/sip gencode.c lexer.l parser.y sip.h transform.c" Message-ID: <20020421190803.6A1803FA97@valentine.thekompany.com> Update of /home/cvs/public/sip/sip In directory valentine:/tmp/cvs-serv5263/sip Modified Files: gencode.c lexer.l parser.y sip.h transform.c Log Message: Added support for the pseudo-type SIP_PYOBJECT. Added the 'P' format character to sipParseArgs(). From phil at thekompany.com Sun Apr 21 21:09:33 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip/siplib siplib.c threads.c" Message-ID: <20020421190803.B05603FA93@valentine.thekompany.com> Update of /home/cvs/public/sip/siplib In directory valentine:/tmp/cvs-serv5263/siplib Modified Files: siplib.c threads.c Log Message: Added support for the pseudo-type SIP_PYOBJECT. Added the 'P' format character to sipParseArgs(). From phil at thekompany.com Sun Apr 21 21:10:07 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog Makefile.in NEWS configure configure.ac" Message-ID: <20020421190802.E470B3FA96@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv5263 Modified Files: ChangeLog Makefile.in NEWS configure configure.ac Log Message: Added support for the pseudo-type SIP_PYOBJECT. Added the 'P' format character to sipParseArgs(). From phil at thekompany.com Sun Apr 21 21:10:33 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog NEWS qevent.sip qtdocs.sip-in" Message-ID: <20020421190825.E1B913FA96@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv5288 Modified Files: ChangeLog NEWS qevent.sip qtdocs.sip-in Log Message: QCustomEvent now expects a PyObject * as its data. From phil at thekompany.com Sun Apr 21 21:10:58 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt/examples semaphore.py Makefile.am" Message-ID: <20020421190825.13AB73FA93@valentine.thekompany.com> Update of /home/cvs/public/PyQt/examples In directory valentine:/tmp/cvs-serv5288/examples Modified Files: Makefile.am Added Files: semaphore.py Log Message: QCustomEvent now expects a PyObject * as its data. From phil at thekompany.com Sun Apr 21 21:11:23 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt/examples3 semaphore.py Makefile.am" Message-ID: <20020421190826.C60863FA97@valentine.thekompany.com> Update of /home/cvs/public/PyQt/examples3 In directory valentine:/tmp/cvs-serv5288/examples3 Modified Files: Makefile.am Added Files: semaphore.py Log Message: QCustomEvent now expects a PyObject * as its data. From laytonjb at bellsouth.net Mon Apr 22 00:27:00 2002 From: laytonjb at bellsouth.net (Jeff Layton) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Newbie trouble building SIP and PyQt Message-ID: <3CC1F259.5DC6327@bellsouth.net> Hello, Newbie here. I'm trying to install sip-3.1 and PyQt-3.1 on a RH 7.2 system. I built python-2.2.1 and installed in in /usr/local/python-2.2.1 (a little atypical, but not too bad). I put sip-3.1 in /usr/local/src/sip-3.1. I'm running configure as, ./configure --prefix=/usr/local/sip-3.1 \ --enable-qt \ --with-qt-dir=/usr/local/qt \ --with-qt-mocdir=/usr/local/qt/bin \ --with-qt-includes=/usr/local/qt/includes \ --with-qt-libraries=/usr/local/qt/lib \ --with-python=/usr/local/python-2.2.1/bin \ --with-python-modules=/usr/local/python-2.2.1/lib/python2.2/site-packages \ --with-python-include=/usr/local/python-2.2.1/include and I'm getting the following errors: (stuff snipped) checking for IceConnectionNumber in -lICE... yes checking for -fno-exceptions... yes ./configure: /usr/local/python-2.2.1/bin: is a directory ./configure: /usr/local/python-2.2.1/bin: is a directory checking Python version... checking where the Python sip module will be installed... /usr/local/python-2.2.1/lib/python2.2/site-packages checking for Python include files... configure: error: Python.h not found Did I install Python incorrectly? Are my configure options correct? TIA, Jeff Layton From barronsnyder at mac.com Mon Apr 22 00:27:53 2002 From: barronsnyder at mac.com (barronsnyder@mac.com) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP + PyQt on Mac OS X Message-ID: I too, was able to get SIP installed (hopefully) but when trying to make PyQt, I get most of the same output as Ludger Humbert. I also show all the same issues with sipqtProxyqt.h (output below). How can I get around this? Thanks for any help, Barron ------begin output------------------ [localhost:/Applications/PyQt-3.2rc2] barron% make make all-recursive Making all in features c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c -o sip_helper.o `test -f sip_helper.cpp || echo './'`sip_helper.cpp /bin/sh ../libtool --mode=link c++ -fno-exceptions -O2 -o sip_helper sip_helper.o -L/sw/lib/python2.2/site-packages -L/Applications/QtMacEval/lib -lqt-mt -L/usr/X11R6/lib -lSM -lICE -lX11 mkdir .libs c++ -fno-exceptions -O2 -o sip_helper sip_helper.o -L/sw/lib/python2.2/site-packages -L/Applications/QtMacEval/lib -lqt-mt -L/usr/X11R6/lib -lSM -lICE -lX11 ./sip_helper >../sipQtFeatures.h Making all in qt c++ -E -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -I.. sipqtProxyqt.h >moc_sipqtProxyqt.h sipqtProxyqt.h:39: undefined type, found `class' sipqtProxyqt.h:39: illegal external declaration, missing `;' after `sipProxyqt' sipqtProxyqt.h:39: undefined type, found `public' sipqtProxyqt.h:39: illegal external declaration, missing `;' after `sipProxy' sipqtProxyqt.h:41: undefined type, found `Q_OBJECT' sipqtProxyqt.h:43: illegal external declaration, missing `;' after `public' sipqtProxyqt.h:46: undefined type, found `public' sipqtProxyqt.h:46: illegal external declaration, missing `;' after `slots' sipqtProxyqt.h:48: undefined type, found `QAction' sipqtProxyqt.h:50: syntax error, found `&' sipqtProxyqt.h:50: illegal function definition, found `)' sipqtProxyqt.h:51: syntax error, found `&' sipqtProxyqt.h:51: illegal function definition, found `)' sipqtProxyqt.h:52: syntax error, found `&' sipqtProxyqt.h:52: illegal function definition, found `)' sipqtProxyqt.h:54: syntax error, found `&' sipqtProxyqt.h:54: illegal function definition, found `)' sipqtProxyqt.h:58: undefined type, found `QIconViewItem' sipqtProxyqt.h:58: syntax error, found `&' sipqtProxyqt.h:58: illegal function definition, found `)' sipqtProxyqt.h:61: undefined type, found `QDropEvent' sipqtProxyqt.h:61: syntax error, found `&' sipqtProxyqt.h:61: illegal function definition, found `)' sipqtProxyqt.h:64: undefined type, found `QIconViewItem' sipqtProxyqt.h:64: syntax error, found `&' sipqtProxyqt.h:64: illegal function definition, found `)' sipqtProxyqt.h:67: undefined type, found `QIconViewItem' sipqtProxyqt.h:67: syntax error, found `&' sipqtProxyqt.h:67: illegal function definition, found `)' sipqtProxyqt.h:70: undefined type, found `QIconViewItem' sipqtProxyqt.h:72: undefined type, found `QListBoxItem' sipqtProxyqt.h:72: syntax error, found `&' sipqtProxyqt.h:72: illegal function definition, found `)' sipqtProxyqt.h:73: undefined type, found `QListBoxItem' sipqtProxyqt.h:73: syntax error, found `&' sipqtProxyqt.h:73: illegal function definition, found `)' sipqtProxyqt.h:74: undefined type, found `QListBoxItem' sipqtProxyqt.h:75: undefined type, found `QListViewItem' sipqtProxyqt.h:76: undefined type, found `QListViewItem' sipqtProxyqt.h:76: syntax error, found `&' sipqtProxyqt.h:76: illegal function definition, found `)' sipqtProxyqt.h:77: undefined type, found `QDropEvent' sipqtProxyqt.h:78: undefined type, found `QListViewItem' sipqtProxyqt.h:78: syntax error, found `&' sipqtProxyqt.h:78: illegal function definition, found `)' sipqtProxyqt.h:79: undefined type, found `QListViewItem' sipqtProxyqt.h:79: syntax error, found `&' sipqtProxyqt.h:79: illegal function definition, found `)' sipqtProxyqt.h:80: undefined type, found `QListViewItem' sipqtProxyqt.h:81: undefined type, found `QDockWindow' sipqtProxyqt.h:82: syntax error, found `&' sipqtProxyqt.h:82: illegal function definition, found `)' sipqtProxyqt.h:83: syntax error, found `&' sipqtProxyqt.h:83: illegal function definition, found `)' sipqtProxyqt.h:84: undefined type, found `QTextCursor' sipqtProxyqt.h:85: syntax error, found `::' sipqtProxyqt.h:85: illegal function definition, found `)' sipqtProxyqt.h:86: syntax error, found `&' sipqtProxyqt.h:86: illegal function definition, found `)' sipqtProxyqt.h:87: syntax error, found `&' sipqtProxyqt.h:87: illegal function definition, found `)' sipqtProxyqt.h:89: syntax error, found `::' sipqtProxyqt.h:89: illegal function definition, found `)' sipqtProxyqt.h:90: syntax error, found `::' sipqtProxyqt.h:90: illegal function definition, found `)' sipqtProxyqt.h:93: syntax error, found `&' sipqtProxyqt.h:93: illegal function definition, found `)' sipqtProxyqt.h:96: syntax error, found `&' sipqtProxyqt.h:96: illegal function definition, found `)' sipqtProxyqt.h:99: undefined type, found `QNetworkOperation' sipqtProxyqt.h:102: syntax error, found `&' sipqtProxyqt.h:102: illegal function definition, found `)' sipqtProxyqt.h:105: syntax error, found `&' sipqtProxyqt.h:105: illegal function definition, found `)' sipqtProxyqt.h:108: undefined type, found `QNetworkOperation' sipqtProxyqt.h:111: syntax error, found `&' sipqtProxyqt.h:111: illegal function definition, found `)' sipqtProxyqt.h:114: syntax error, found `&' sipqtProxyqt.h:114: illegal function definition, found `)' sipqtProxyqt.h:115: undefined type, found `QWidget' sipqtProxyqt.h:116: undefined type, found `QObject' cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode /Applications/QtMacEval/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c -o qtcmodule.lo `test -f qtcmodule.cpp || echo './'`qtcmodule.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fno-common -DPIC -o qtcmodule.lo qtcmodule.cpp:168: sipqtQNetworkProtocolFactoryBase.h: No such file or directory In file included from qtcmodule.cpp:169: sipqtQNetworkProtocol.h:46: sipqtQNetworkProtocolFactoryBase.h: No such file or directory make[2]: *** [qtcmodule.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 From claustre at esrf.fr Mon Apr 22 10:25:01 2002 From: claustre at esrf.fr (Laurent Claustre) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] HP-UX 10.20 runtime error at installation of PyQt References: <3CB28D61.8060000@esrf.fr> <3CB8096A.262F02BE@river-bank.demon.co.uk> Message-ID: <3CC3C890.40405@esrf.fr> I've upgraded my PyQt/sip installation to 3.2rc2 nevertheless the problem is quite similar. Any idea? Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) [GCC 2.95.2 19991024 (release)] on hp-uxB Type "copyright", "credits" or "license" for more information. >>> import qt Traceback (most recent call last): File "", line 1, in ? File "/segfs/bliss/depot/pythonesrf_5.0/hpux102/lib/python2.1/site-packages/qt.py", line 935, in ? libqtc.sipRegisterClasses() RuntimeError: Attempt to create a Python instance for a NULL pointer >>> Phil Thompson wrote: >Laurent Claustre wrote: > >>Hi, >> With PyQt/sip 3.1rc1 on HP-UX 10.20 I've got something like this: >> >>Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) >>[GCC 2.95.2 19991024 (release)] on hp-uxB >>Type "copyright", "credits" or "license" for more information. >> >>>>>import qt >>>>> >>Traceback (most recent call last): >> File "", line 1, in ? >> File "/segfs/bliss/depot/pythonesrf_5.0/hpux102/lib/python2.1/site-packages/qt.py", line 933, in ? >> libqtc.sipRegisterClasses() >>RuntimeError: Attempt to create a Python instance for a NULL pointer >> >> Any ideas how to fix this? >>I am using qt-3.0.1, sip+PyQt 3.1rc1, everything freshly compiled with >>gcc-2.95.2. >> >>Regards, >> >>PS: i've seen such a request message from archive (august 2001) but without any response, so I >>try to get help form you ! >> > >Try upgrading to the final release of 3.1. There was a SIP bug that >sometimes caused false exceptions to be raised. > >Phil > -- /===============================================================\ | Laurent Claustre | eMail: claustre@esrf.fr | | BeamLine Instrument Software | Phone: +33 (0)476 88 29 12 | | Support Group (BLISS) | Fax : +33 (0)476 88 25 42 | | Experiments Division | Central Building Room 150 | | ------------------------------------------------------------- | | European Synchrotron Radiation Facility | | 6 rue Jules Horowitz BP220 38042 Grenoble Cedex - France | \===============================================================/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020422/ca322a9c/attachment.html From papadopo at remove.shfj.decoy.cea.fr Mon Apr 22 13:04:01 2002 From: papadopo at remove.shfj.decoy.cea.fr (Dimitri Papadopoulos) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Re: Building SIP + PyQt on Mac OS X References: <3CBFEAAD.98A0EE8D@REMOVE.shfj.DECOY.cea.fr> Message-ID: <3CC3BAC6.CD462E2C@REMOVE.shfj.DECOY.cea.fr> I wrote: > > For those interested, this describes how to build SIP+PyQt on > Mac OS X using the following: > [...] > 2) Building PyQt: > > This is pretty straightforward. There is one single problem. > The following functions are declared in the Qt headers but > are missing from the Qt library libqt-mt.dylib: > QFont::dirty() > QClipboard::ownsClipboard() > QClipboard::ownsSelection() > qAppName() > This will result in linker errors. You'll have to comment out > these functions in the respective qt/sipqtQ.cpp file. Just looking at the sources, the above problems seem to be fixed in PyQt 3.2rc2. I can't tell for sure, I haven't built PyQt 3.2rc2 yet. There were other problems in PyQt 3.2rc1 I had forgotten to report: Qt defines QThread::currentThread() like this static Qt::HANDLE currentThread(); which is defined this way in qnamespace.h: #if defined(Q_WS_MAC) typedef void * HANDLE; #elif defined(Q_WS_WIN) typedef void *HANDLE; #elif defined(Q_WS_X11) typedef unsigned long HANDLE; #elif defined(Q_WS_QWS) typedef void * HANDLE; #endif PyQt 3.2rc1 is using "unsigned long" so you'll get compiler errors. This seems to be fixed in PyQt 3.2rc2 too. Finally, I don't know about this warning: cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode Maybe it's related to the SDK version? Make sure you have the latest SDK version. I'll write a new report for SIP 3.2rc2 and PyQt 3.2rc2 as soon I have tested them, and I'll report the SDK version I am using. Dimitri From 1620-581 at onlinehome.de Mon Apr 22 13:04:23 2002 From: 1620-581 at onlinehome.de (Andreas Gerber) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Problems with PyQt 3.1 and VTK Message-ID: Hi, I found a strange behaviour while trying to upgrade from PyQt 3.0 (QT 2.3) to PyQt 3.1 (QT 3.0.3) under Suse 8.0 and vtk 4.0, python 2.2. The example code in QVTKRenderWidget.py works well with both versions of PyQt. But if I add a non-empty ToolBar to my application the main window doesn't appear and CPU load reaches 100 %. Andreas Prof. Dipl.-Phys. Andreas Gerber Karlstr. 11 Fachhochschule Biberach 88400 Biberach mailto:gerber@fh-biberach.de Tel: +49 7351 582 257 http://www.fh-biberach.de Fax: +49 7351 582 299 From papadopo at remove.shfj.decoy.cea.fr Mon Apr 22 14:08:00 2002 From: papadopo at remove.shfj.decoy.cea.fr (Dimitri Papadopoulos) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP + PyQt [3.2rc2] on Mac OS X Message-ID: <3CC3FC17.14F00A0E@REMOVE.shfj.DECOY.cea.fr> Hi, For those interested, this describes how to build SIP+PyQt on Mac OS X using the following: Mac OS X 10.1.3 I understand 10.1 is suggested by Trolltech: http://www.trolltech.com/developer/platforms/osx.html December 2001 Mac OS X Developer Tools SIP 3.2rc2 http://www.riverbankcomputing.co.uk/download/snapshots/sip-3.2rc1.tar.gz Note that SIP 3.1 has a minor bug that results in a linker error. SIP 3.2rc1 fixes that issue, I suggest you use SIP 3.2rc2. PyQt 3.2rc2 for Mac OS X http://www.riverbankcomputing.co.uk/download/snapshots/PyQt-3.2rc2-Qt-3.0.2-MacX.tar.gz Note that PyQt 3.1 does not disable some X11-only functions and has some problems with casting "unsigned long" to "void*", and that PyQt 3.2rc1 calls other functions declared in the Qt headers but no implemented in the Qt/Mac library. PyQt 3.2rc2 fixes all these issues, I suggest you use it. Qt/Mac evaluation version http://www.trolltech.com/products/qt/evaluate.html Python for Mac OS X http://fink.sourceforge.net/pdb/package.php/python There are two versions of Python for Mac OS X: * the above Python for Mac OS X which can be run from the command line * the traditional MacPython that knows nothing of command lines and UNIX Because MacPython cannot be called from the command line and I couldn't even identify a Python executable, and because PyQt requires the Python executable to be indetified using the --with-python=FILE option, we were not able to configure PyQt with MacPython. See also paragraph "MacOS X command-line interpreter" on this page: http://www.cwi.nl/~jack/macpython.html I suggest you use Python for Mac OS X from Fink. Provided you're using SIP 3.2rc2 and PyQt 3.2rc2, SIP and PyQt should build out of the box on Mac OS X, with the exception of: 1) You'll see warnings of the kind described in http://mats.gmd.de/pipermail/pykde/2002-April/002540.html http://mats.gmd.de/pipermail/pykde/2002-April/002555.html and end with: cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode These warnings can be safely ignored. They're the result of a harmless compiler bug: http://www.wxwindows.org/faqmac.htm#smarterrors 2) Mac OS makes a distinction between modules and shared libraries: http://fink.sourceforge.net/doc/porting/shared.php In short: * shared libraries are named libfoo.dylib, while modules can be named whatever (like on most systems) and are usually named libfoo.so in software ported from UNIX. * shared libraries are linked using the compiler option -dynamiclib while modules ("bundles" in Mac OS terminology) should be linked using the compiler option -bundle We had to change manually the linking command line for SIP and PyQt. In SIP for example, we had to change from: c++ -dynamiclib -flat_namespace [...] -install_name /sw/lib/python2.2/site-packages/libsip.9.dylib -compatibility_version 10 -current_version 10 to: c++ -bundle -flat_namespace [...] -install_name /sw/lib/python2.2/site-packages/libsip.9.dylib -compatibility_version 10 -current_version 10.0 Either manually modify the libtool script in the root directory, or run the above command line manually. Then the resulting module is named libsip.dylib, but Python expects its modules to be named lib.so, so either symlink libsip.dylib to libsip.so or copy or move it. You'll have to repeat this step for each and every module in PyQt... Dimitri From phil at river-bank.demon.co.uk Mon Apr 22 14:25:01 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Newbie trouble building SIP and PyQt References: <3CC1F259.5DC6327@bellsouth.net> Message-ID: <3CC400AC.6CC78D0E@river-bank.demon.co.uk> Jeff Layton wrote: > > Hello, > > Newbie here. I'm trying to install sip-3.1 and PyQt-3.1 on a RH > 7.2 system. I built python-2.2.1 and installed in in /usr/local/python-2.2.1 > (a little atypical, but not too bad). I put sip-3.1 in /usr/local/src/sip-3.1. > I'm running configure as, > > ./configure --prefix=/usr/local/sip-3.1 \ > --enable-qt \ > --with-qt-dir=/usr/local/qt \ > --with-qt-mocdir=/usr/local/qt/bin \ > --with-qt-includes=/usr/local/qt/includes \ > --with-qt-libraries=/usr/local/qt/lib \ > --with-python=/usr/local/python-2.2.1/bin \ > --with-python-modules=/usr/local/python-2.2.1/lib/python2.2/site-packages \ > --with-python-include=/usr/local/python-2.2.1/include > > and I'm getting the following errors: > > (stuff snipped) > checking for IceConnectionNumber in -lICE... yes > checking for -fno-exceptions... yes > ./configure: /usr/local/python-2.2.1/bin: is a directory > ./configure: /usr/local/python-2.2.1/bin: is a directory > checking Python version... > checking where the Python sip module will be installed... /usr/local/python-2.2.1/lib/python2.2/site-packages > checking for Python include files... configure: error: Python.h not found > > Did I install Python incorrectly? Are my configure options > correct? Try... --with-python=/usr/local/python-2.2.1/bin/python You shouldn't need the rest of the Python related options, and the only Qt related one you should need is --with-qt-dir. Phil From bs1535 at sbc.com Mon Apr 22 18:37:00 2002 From: bs1535 at sbc.com (SNYDER, BARRON F (AIT)) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP + PyQt [3.2rc2] on Mac OS X Message-ID: <35BD410BA148D411A7ED00508BCFFBDA0C16C86D@msgil65170u05.nbk2305.il.ameritech.com> For those of us who may need a little more hand-holding (idiots like me ), where would I put the new linking command (Dimitri's step 2) within the libtool script? Or, how should I run the linking command manually? When I tried it at the prompt (from the sip-3.2rc2 directory, I received: c++: No match. Also, using Dimitri's directions (Thank you very much!) are the steps as follows? 1) configure 1b) add linking command 2) make (or run linking command from command prompt if not added to script (1b)) 3) make install Sorry, I'm not much of a c/c++ guy and am more familiar with binary installs rather than compiling installs (but am willing to learn!). Thanks, Barron -----Original Message----- From: Dimitri Papadopoulos [mailto:papadopo@remove.shfj.decoy.cea.fr] Sent: Monday, April 22, 2002 7:04 AM To: pykde@mats.gmd.de Subject: [PyKDE] Building SIP + PyQt [3.2rc2] on Mac OS X Hi, For those interested, this describes how to build SIP+PyQt on Mac OS X using the following: Mac OS X 10.1.3 I understand 10.1 is suggested by Trolltech: http://www.trolltech.com/developer/platforms/osx.html December 2001 Mac OS X Developer Tools SIP 3.2rc2 http://www.riverbankcomputing.co.uk/download/snapshots/sip-3.2rc1.tar.gz Note that SIP 3.1 has a minor bug that results in a linker error. SIP 3.2rc1 fixes that issue, I suggest you use SIP 3.2rc2. PyQt 3.2rc2 for Mac OS X http://www.riverbankcomputing.co.uk/download/snapshots/PyQt-3.2rc2-Qt-3.0.2- MacX.tar.gz Note that PyQt 3.1 does not disable some X11-only functions and has some problems with casting "unsigned long" to "void*", and that PyQt 3.2rc1 calls other functions declared in the Qt headers but no implemented in the Qt/Mac library. PyQt 3.2rc2 fixes all these issues, I suggest you use it. Qt/Mac evaluation version http://www.trolltech.com/products/qt/evaluate.html Python for Mac OS X http://fink.sourceforge.net/pdb/package.php/python There are two versions of Python for Mac OS X: * the above Python for Mac OS X which can be run from the command line * the traditional MacPython that knows nothing of command lines and UNIX Because MacPython cannot be called from the command line and I couldn't even identify a Python executable, and because PyQt requires the Python executable to be indetified using the --with-python=FILE option, we were not able to configure PyQt with MacPython. See also paragraph "MacOS X command-line interpreter" on this page: http://www.cwi.nl/~jack/macpython.html I suggest you use Python for Mac OS X from Fink. Provided you're using SIP 3.2rc2 and PyQt 3.2rc2, SIP and PyQt should build out of the box on Mac OS X, with the exception of: 1) You'll see warnings of the kind described in http://mats.gmd.de/pipermail/pykde/2002-April/002540.html http://mats.gmd.de/pipermail/pykde/2002-April/002555.html and end with: cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode These warnings can be safely ignored. They're the result of a harmless compiler bug: http://www.wxwindows.org/faqmac.htm#smarterrors 2) Mac OS makes a distinction between modules and shared libraries: http://fink.sourceforge.net/doc/porting/shared.php In short: * shared libraries are named libfoo.dylib, while modules can be named whatever (like on most systems) and are usually named libfoo.so in software ported from UNIX. * shared libraries are linked using the compiler option -dynamiclib while modules ("bundles" in Mac OS terminology) should be linked using the compiler option -bundle We had to change manually the linking command line for SIP and PyQt. In SIP for example, we had to change from: c++ -dynamiclib -flat_namespace [...] -install_name /sw/lib/python2.2/site-packages/libsip.9.dylib -compatibility_version 10 -current_version 10 to: c++ -bundle -flat_namespace [...] -install_name /sw/lib/python2.2/site-packages/libsip.9.dylib -compatibility_version 10 -current_version 10.0 Either manually modify the libtool script in the root directory, or run the above command line manually. Then the resulting module is named libsip.dylib, but Python expects its modules to be named lib.so, so either symlink libsip.dylib to libsip.so or copy or move it. You'll have to repeat this step for each and every module in PyQt... Dimitri _______________________________________________ PyKDE mailing list PyKDE@mats.gmd.de http://mats.gmd.de/mailman/listinfo/pykde From humbert at hagen.de Mon Apr 22 19:20:02 2002 From: humbert at hagen.de (Ludger Humbert) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP References: <35BD410BA148D411A7ED00508BCFFBDA0C16C86D@msgil65170u05.nbk2305.il.ameritech.com> Message-ID: <3CC4460A.3020902@hagen.de> Hi, you SNYDER, BARRON F (AIT) wrote: > For those of us who may need a little more hand-holding (idiots like me > ), where would I put the new linking command (Dimitri's step 2) within > the libtool script? > > Or, how should I run the linking command manually? When I tried it at the > prompt (from the sip-3.2rc2 directory, I received: > c++: No match. Did you install the developer tools from Apple / may be the 3rd CD, but you can get it via developer.apple.com but you have to register first. Deatils are presented on http://developer.apple.com/tools/compilers.html After installing all the stuff before running ./configure I changed the line containing archive_cmds='$nonopt .... echo -dynamiclib ... into archive_cmds='$nonopt .... echo -bundle ... After that ./configure works. Next step make an then change to "root" make install and sip is installed. > We had to change manually the linking command line for SIP > and PyQt. In SIP for example, we had to change from: > c++ -dynamiclib -flat_namespace [...] -install_name .. > to: > c++ -bundle -flat_namespace [...] -install_name Ludger From bs1535 at sbc.com Mon Apr 22 20:44:00 2002 From: bs1535 at sbc.com (SNYDER, BARRON F (AIT)) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP Message-ID: <35BD410BA148D411A7ED00508BCFFBDA0C16C870@msgil65170u05.nbk2305.il.ameritech.com> Ludger Humbert wrote: >Did you install the developer tools from Apple / may be the 3rd CD, Yes, I do have the developer tools installed. >before running ./configure >I changed the line >containing > archive_cmds='$nonopt .... echo -dynamiclib ... >into > archive_cmds='$nonopt .... echo -bundle ... > >After that >./configure >works. It looks like that change has already been made to the file. In sip-3.2rc2, the line you refer to reads: archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $delibs$linker_flags -install_name $rpath/$soname $verstring' It seems to me that .configure works "as is" without any changes. It's "make"/"make install" that gives errors... Thanks, Barron From phil at river-bank.demon.co.uk Mon Apr 22 20:59:00 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] HP-UX 10.20 runtime error at installation of PyQt References: <3CB28D61.8060000@esrf.fr> <3CB8096A.262F02BE@river-bank.demon.co.uk> <3CC3C890.40405@esrf.fr> Message-ID: <3CC45D26.A7FCF3C6@river-bank.demon.co.uk> Laurent Claustre wrote: > > I've upgraded my PyQt/sip installation to 3.2rc2 nevertheless the > problem is quite similar. Any idea? > > Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) > [GCC 2.95.2 19991024 (release)] on hp-uxB > Type "copyright", "credits" or "license" for more information. > >>> import qt > Traceback (most recent call last): > File "", line 1, in ? > File > "/segfs/bliss/depot/pythonesrf_5.0/hpux102/lib/python2.1/site-packages/qt.py", > line 935, in ? > libqtc.sipRegisterClasses() > RuntimeError: Attempt to create a Python instance for a NULL pointer > >>> All I can suggest is to add printf()s in sipAddClassInstances() (in siplib.c) to work out the instance that's failing. Before the call to sipNewCppToSelf() print the value of ci->ci_name to determine the class, then look up the table for that class in registerClasses() in qtcmodule.cpp to find the instance. The odd thing is that the relevant value is always the address of a Qt object, which implies a linker problem. Phil From phil at thekompany.com Mon Apr 22 23:29:01 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog INSTALL.win32 Makefile.in NEWS configure configure.ac mkinstalldirs" Message-ID: <20020422213106.DD0263FB0E@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv28664 Modified Files: ChangeLog INSTALL.win32 Makefile.in NEWS configure configure.ac mkinstalldirs Log Message: Explicitly include pythread.h. Changed the Windows installation instructions to put things in site-packages. Added -module to the libtool flags. Added sipMapStringToClass() and sipMapIntToClass() for %ConvertToSubClassCode. From phil at thekompany.com Mon Apr 22 23:32:26 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip/sip gencode.c" Message-ID: <20020422213107.54EE33FB0F@valentine.thekompany.com> Update of /home/cvs/public/sip/sip In directory valentine:/tmp/cvs-serv28664/sip Modified Files: gencode.c Log Message: Explicitly include pythread.h. Changed the Windows installation instructions to put things in site-packages. Added -module to the libtool flags. Added sipMapStringToClass() and sipMapIntToClass() for %ConvertToSubClassCode. From phil at thekompany.com Mon Apr 22 23:34:49 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip/siplib Makefile.am Makefile.in sip.h siplib.c threads.c" Message-ID: <20020422213107.7107C3FB12@valentine.thekompany.com> Update of /home/cvs/public/sip/siplib In directory valentine:/tmp/cvs-serv28664/siplib Modified Files: Makefile.am Makefile.in sip.h siplib.c threads.c Log Message: Explicitly include pythread.h. Changed the Windows installation instructions to put things in site-packages. Added -module to the libtool flags. Added sipMapStringToClass() and sipMapIntToClass() for %ConvertToSubClassCode. From bs1535 at sbc.com Mon Apr 22 23:44:01 2002 From: bs1535 at sbc.com (SNYDER, BARRON F (AIT)) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP Message-ID: <35BD410BA148D411A7ED00508BCFFBDA0C16C871@msgil65170u05.nbk2305.il.ameritech.com> Ludger, thanks for the reply. I made the change you suggested and everything works for the SIP install. But, I don't think this change is necessary anymore with sip-3.2rc2. It may have been necessary with sip-3.2rc1. I tried it both ways, "as is" and with your change. I get the exact same output and install either way and so I think the stock configure file is fine in sip-3.2rc2. One note with the SIP make install. I get the following messages: ... make[2]: Nothing to be done for 'install-exec-am'. make[2]: Nothing to be done for 'install-data-am'. Should I be concerned with these? My problem now lies with understanding how to get PyQt installed.... -Barron -----Original Message----- From: Ludger Humbert Sent: Monday, April 22, 2002 2:26 PM To: SNYDER, BARRON F (AIT) Subject: Re: [PyKDE] Building SIP BARRON >> archive_cmds='$nonopt .... echo -dynamiclib ... >>into >> archive_cmds='$nonopt .... echo -bundle ... >> >>After that >>./configure >>works. >> > > It looks like that change has already been made to the file. In sip-3.2rc2, > the line you refer to reads: > archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo > -dynamiclib change this too into -bundle Ludger From phil at thekompany.com Tue Apr 23 00:54:01 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt/lib INSTALL.win32 sip_helper.pro" Message-ID: <20020422225632.2B4933FB24@valentine.thekompany.com> Update of /home/cvs/public/PyQt/lib In directory valentine:/tmp/cvs-serv30416/lib Modified Files: INSTALL.win32 sip_helper.pro Log Message: Changed the Windows installation instructions to put things in site-packages. Fixed the missing QT_THREAD_SUPPORT when building sip_helper on Windows. Added -module to all LDFLAGS. From phil at thekompany.com Tue Apr 23 00:55:19 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog Makefile qcanvas.sip qgl.sip qobject.sip qpeapplication.sip qsocket.sip qsqldatabase.sip qtable.sip qtmod.sip-in qtpemod.sip-in qtsqlmod.sip-in qtxmlmod.sip-in subbuild.sip-in" Message-ID: <20020422225632.0EEA63FB2F@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv30416 Modified Files: ChangeLog Makefile qcanvas.sip qgl.sip qobject.sip qpeapplication.sip qsocket.sip qsqldatabase.sip qtable.sip qtmod.sip-in qtpemod.sip-in qtsqlmod.sip-in qtxmlmod.sip-in subbuild.sip-in Log Message: Changed the Windows installation instructions to put things in site-packages. Fixed the missing QT_THREAD_SUPPORT when building sip_helper on Windows. Added -module to all LDFLAGS. From rjones at ekit-inc.com Tue Apr 23 01:06:01 2002 From: rjones at ekit-inc.com (Richard Jones) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] PyKDE useful for KDE plugins? Message-ID: <200204230830.39655.rjones@ekit-inc.com> Would it be possible to use Python two write plugins for programs in KDE? A specific case is Noatun, which I'd really like to write a decent playlist manager for. I don't know C++ well enough to write something like that, and I'd really rather avoid writing C++ in any case. Would I be able to use python in this case? Richard From aheading at jpmorgan.com Tue Apr 23 05:26:00 2002 From: aheading at jpmorgan.com (Anthony Heading) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Small fix for non-threaded SIP 3.2rc2 In-Reply-To: <3CBFE9B1.8059DE83@river-bank.demon.co.uk>; from phil@river-bank.demon.co.uk on Fri, Apr 19, 2002 at 10:56:01AM +0100 References: <3CBFE9B1.8059DE83@river-bank.demon.co.uk> Message-ID: <20020423122503.A30@tkd-fires-01.ja.jpmorgan.com> Hi, I needed to make this change to sip.h. This macro is in various places the target of a label at the end of a block; without it gcc complains about "label must be followed by statement" or something similar. Thanks! Anthony (Linux gcc-2.95.3(+debian updates)) diff -ru mysip/siplib/sip.h /opt/python/include/sip.h --- mysip/siplib/sip.h Tue Apr 16 22:46:51 2002 +++ /opt/python/include/sip.h Tue Apr 23 11:49:20 2002 @@ -369,8 +369,8 @@ #define SIP_BLOCK_THREADS sipBlockThreads(); #define SIP_UNBLOCK_THREADS PyEval_SaveThread(); #else -#define SIP_BLOCK_THREADS -#define SIP_UNBLOCK_THREADS +#define SIP_BLOCK_THREADS 0; +#define SIP_UNBLOCK_THREADS 0; #endif #ifdef __cplusplus From aheading at jpmorgan.com Tue Apr 23 05:40:00 2002 From: aheading at jpmorgan.com (Anthony Heading) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Small fix for non-threaded SIP 3.2rc3 (not rc2) In-Reply-To: <20020423122503.A30@tkd-fires-01.ja.jpmorgan.com>; from aheading@jpmorgan.com on Tue, Apr 23, 2002 at 12:25:03PM +0900 References: <3CBFE9B1.8059DE83@river-bank.demon.co.uk> <20020423122503.A30@tkd-fires-01.ja.jpmorgan.com> Message-ID: <20020423123746.A238@tkd-fires-01.ja.jpmorgan.com> Oops. This is actually a fix for 3.2rc3. Sorry for confusion. A From jbublitz at nwinternet.com Tue Apr 23 06:02:01 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Re: PyKDE useful for KDE plugins? In-Reply-To: <20020422230601.2677.19878.Mailman@mats> Message-ID: On 22-Apr-02 Richard Jones Would it be possible to use Python two write plugins for programs > in KDE? A specific case is Noatun, which I'd really like to > write a decent playlist manager for. I don't know C++ well > enough to write something like that, and I'd really rather > avoid writing C++ in any case. Would I be able to use > python in this case? I completely share your sentiments about Noatun playlists, and also about not writing something like that in C++. I haven't looked specifically at Noatun, but the general situation re: plugins for the stuff I have looked at is that there are three basic obstacles to writing KDE plugins in Python: 1. KDE plugins are libtool libraries (an .so and an accompanying .la library) - hard to do in Python. 2. A plugin has to understand the API for the app it's being plugged in to. That means a Noatun plugin has to have some idea about how to interface to Noatun. In C++, that's done with .h files. In Python that means bindings for at least some part of Noatun. 3. A Python script has to have a Python interpreter to run. In reverse order, (3) is easy and I have that working. How easy (2) is depends on how you want to approach it. To do a complete set of bindings for Noatun is probably a 100+ hour job, you'll end up with a lib in the several MB range, and the interface may or may not be user friendly (you'd probably want to use Python lists/dicts easily for example) to a Python developer depending on how Noatun is put together. The alternative is a very lightweight/high level set of bindings - I have something similar working for KSpread and it takes very little time once you figure out the app's API (most KDE stuff is pretty well written too). Once you have (2), it's maybe a few hours work to write a small C++ lib to accomplish (1) - basically a lib that gets loaded by Noatun as a plugin, and in turn knows how to load Python as a plugin and also load arbitrary Python scripts and pass them to Python. This is basically the same discussion as the one about a week ago concerning panel applets, except that panel applets don't have the API/bindings requirements that app plugins do. Note that none of this has anything to do with PyKDE (but sip makes it really easy), other than you can use PyKDE (or any other Python module) in writing plugin scripts. What I have at the moment is in pretty rough shape and there are some logistical concerns (autoconf/automake, what .h files does the end-user have to have, how to package the whole thing, etc.). In addition I want to get PyKDE2 for KDE3.0 released first (it's not very far off) and then get something released related to doing plugins/panel applets as soon after PyKDE2 as possible. Right now it looks like the memory footprint for something like this is about 1MB (with the Python interpreter being about 80% of that) - PyKDE style bindings would be considerably larger. You could also look at something like 'boost' (www.boost.org). While generally I don't like the boost approach myself, it might work well for something like this. There are probably other ways to attack this as well - I just found doing it this way *really* easy and hope to get back to working on it soon. I would really like a good Python playlist plugin for Noatun and I'd like it even better if I didn't have to write it. Stay tuned. Jim From humbert at hagen.de Tue Apr 23 08:36:00 2002 From: humbert at hagen.de (Ludger Humbert) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] TNX [SIP 3.2rc3 on Mac OS X builds out of the box] References: <35BD410BA148D411A7ED00508BCFFBDA0C16C871@msgil65170u05.nbk2305.il.ameritech.com> Message-ID: <3CC4FB40.9000609@hagen.de> Hi Barron, the actual version at download/snapshots is sip-3.2rc3.tar.gz It builds "out of the box" with the usual ./configure make make install dance for me. bs> One note with the SIP make install. I get the following messages: ... bs> make[2]: Nothing to be done for 'install-exec-am'. bs> make[2]: Nothing to be done for 'install-data-am'. same for me. bs> Should I be concerned with these? I don't think so .. but I am not really sure. bs> My problem now lies with understanding how to get PyQt installed.... your problem ... is my problem > -Barron Ludger From claustre at esrf.fr Tue Apr 23 09:32:00 2002 From: claustre at esrf.fr (Laurent Claustre) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] HP-UX 10.20 runtime error at installation of PyQt References: <3CB28D61.8060000@esrf.fr> <3CB8096A.262F02BE@river-bank.demon.co.uk> <3CC3C890.40405@esrf.fr> <3CC45D26.A7FCF3C6@river-bank.demon.co.uk> Message-ID: <3CC50DB2.4040503@esrf.fr> Phil Thompson wrote: >Laurent Claustre wrote: > >>I've upgraded my PyQt/sip installation to 3.2rc2 nevertheless the >>problem is quite similar. Any idea? >> >>Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) >>[GCC 2.95.2 19991024 (release)] on hp-uxB >>Type "copyright", "credits" or "license" for more information. >> >>>>>import qt >>>>> >>Traceback (most recent call last): >> File "", line 1, in ? >> File >>"/segfs/bliss/depot/pythonesrf_5.0/hpux102/lib/python2.1/site-packages/qt.py", >>line 935, in ? >> libqtc.sipRegisterClasses() >>RuntimeError: Attempt to create a Python instance for a NULL pointer >> > >All I can suggest is to add printf()s in sipAddClassInstances() (in >siplib.c) to work out the instance that's failing. > >Before the call to sipNewCppToSelf() print the value of ci->ci_name to >determine the class, then look up the table for that class in >registerClasses() in qtcmodule.cpp to find the instance. > >The odd thing is that the relevant value is always the address of a Qt >object, which implies a linker problem. > >Phil > OK, the failed instance is "whatsThisCursor" and from within registerClasses() instance is Qt::whatsThisCursor. this is the output: Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) [GCC 2.95.2 19991024 (release)] on hp-uxB Type "copyright", "credits" or "license" for more information. >>> import qt laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = qApp laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = null laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = nbsp laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = byteOrderSwapped laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = byteOrderMark laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = replacement laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = null laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = whatsThisCursor Traceback (most recent call last): File "", line 1, in ? File "qt.py", line 935, in ? libqtc.sipRegisterClasses() RuntimeError: Attempt to create a Python instance for a NULL pointer Cheers. /===============================================================\ | Laurent Claustre | eMail: claustre@esrf.fr | | BeamLine Instrument Software | Phone: +33 (0)476 88 29 12 | | Support Group (BLISS) | Fax : +33 (0)476 88 25 42 | | Experiments Division | Central Building Room 150 | | ------------------------------------------------------------- | | European Synchrotron Radiation Facility | | 6 rue Jules Horowitz BP220 38042 Grenoble Cedex - France | \===============================================================/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020423/a667e88c/attachment.html From terry at beam.demon.co.uk Tue Apr 23 10:19:00 2002 From: terry at beam.demon.co.uk (Terry Barnaby) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Problem with QTable and QTableItem with PyQT-2.4 and PyQT-3.1 References: <3CC00897.E7C39D08@beam.demon.co.uk> <3CC01FB5.41A436CD@river-bank.demon.co.uk> <3CC0255A.E93CC130@beam.demon.co.uk> <3CC19053.76FB14E3@river-bank.demon.co.uk> Message-ID: <3CC51615.2D6D7241@beam.demon.co.uk> Hi Phil, Thanks for the prompt response and all of you work with PyQt etc It is really useful. Cheers Terry Phil Thompson wrote: > Terry Barnaby wrote: > > > > > Hi, > > > > > > > > I am trying to use the QTable and QTableItem classes and seem to have a problem. > > > > If I use setText() to create a table cell it works fine. > > > > If however I create the QTableItem() manually (In the same way as the C++ version > > > > of setText() does it) and add the item using setItem() there is no text displayed > > > > in the cell. Creating a C++ version of the code works fine. > > > > > > > > t = QTable(5, 10, s) > > > > t.show() > > > > > > > > t.setText(0, 0, "Hello"); > > > > i = QTableItem(t, QTableItem.OnTyping, "HH", QPixmap()); > > > > print "Item:", i, i.text(); > > > > t.setItem(0, 1, i); > > > > > > > > Any ideas ? > > > > I enclose the code that fails. > > > > We are using RedHat 7.2, Python 1.5 and Python 2.1 with QT 2.3.1. > > It's a bug. It will be fixed in v3.2. > > Phil > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde -- Dr Terry Barnaby BEAM Ltd Phone: +44 1454 324512 Northavon Business Center, Dean Rd Fax: +44 1454 313172 Yate, Bristol, BS37 5NH, UK Email: terry@beam.demon.co.uk Web: www.beam.demon.co.uk BEAM for: Visually Impaired X-Terminals, Parallel Processing, Software Dev "Tandems are twice the fun !" From phil at river-bank.demon.co.uk Tue Apr 23 11:04:01 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] HP-UX 10.20 runtime error at installation of PyQt References: <3CB28D61.8060000@esrf.fr> <3CB8096A.262F02BE@river-bank.demon.co.uk> <3CC3C890.40405@esrf.fr> <3CC45D26.A7FCF3C6@river-bank.demon.co.uk> <3CC50DB2.4040503@esrf.fr> Message-ID: <3CC522D7.1F2EA84C@river-bank.demon.co.uk> Laurent Claustre wrote: > > OK, > the failed instance is "whatsThisCursor" and from within > registerClasses() instance is Qt::whatsThisCursor. > this is the output: > Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) > [GCC 2.95.2 19991024 (release)] on hp-uxB > Type "copyright", "credits" or "license" for more information. > >>> import qt > laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = > qApp > laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = > null > laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = > nbsp > laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = > byteOrderSwapped > laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = > byteOrderMark > laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = > replacement > laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = > null > laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = > whatsThisCursor > Traceback (most recent call last): > File "", line 1, in ? > File "qt.py", line 935, in ? > libqtc.sipRegisterClasses() > RuntimeError: Attempt to create a Python instance for a NULL pointer That's the first QCursor. Try commenting out that entry in the table in qtcmodule.cpp to see if the problem is whatsThisCursor (ie. the problem goes away), or QCursors in general (in which case it will fail at forbiddenCursor). Can you try some C++ experiments taking the address of Qt::whatsThisCursor? I'm away for a few days and won'e be able to reply until the weekend. Phil From phil at river-bank.demon.co.uk Tue Apr 23 11:05:37 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Program crash using QCanvasRectangle References: <1674EE9F0613D3119BB80008C79FDB560114B02B@SAX_NTEX> Message-ID: <3CC5231A.B90E16F8@river-bank.demon.co.uk> "Kaercher, Joerg" wrote: > > Hi, > > I have installed PyQt-3.0 (patch level 4; Qt 3.0.3; MS Visual Studio 6) > under Windows 2K. Using the QCanvas classes I discovered that calling the > brush() method in QCanvasRectangle causes the whole application to crash. > Here is an example program: > > import qt > import qtcanvas > import sys > > a=qt.QApplication(sys.argv) > > c=qtcanvas.QCanvas(256,256) > v=qtcanvas.QCanvasView(c) > > list=[] > for n in range(0,100,10): > list.append(qtcanvas.QCanvasRectangle(10+n,10+n,50,50,c)) > print 'pen()' > print list[-1].pen() > print 'brush()' > print list[-1].brush() > print 'show()' > list[-1].show() > > a.setMainWidget(v) > v.show() > a.exec_loop() > > Did anybody else have the same problem? I've just got round to testing this with the latest 3.2rc and didn't have a problem. Phil From phil at thekompany.com Tue Apr 23 11:07:01 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog mkinstalldirs" Message-ID: <20020423090908.578053FB1C@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv9264 Modified Files: ChangeLog mkinstalldirs Log Message: Fix to SIP_[UN]BLOCK_THREADS for when thread support is disabled. From phil at thekompany.com Tue Apr 23 11:08:21 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [cvs commit] "sip/siplib Makefile.am Makefile.in sip.h siplib.pro" Message-ID: <20020423090908.9A5513FB28@valentine.thekompany.com> Update of /home/cvs/public/sip/siplib In directory valentine:/tmp/cvs-serv9264/siplib Modified Files: Makefile.am Makefile.in sip.h siplib.pro Log Message: Fix to SIP_[UN]BLOCK_THREADS for when thread support is disabled. From humbert at hagen.de Tue Apr 23 11:33:00 2002 From: humbert at hagen.de (Ludger Humbert) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] PyQt-3.2rc3 on Mac OS X References: <35BD410BA148D411A7ED00508BCFFBDA0C16C871@msgil65170u05.nbk2305.il.ameritech.com> <3CC4FB40.9000609@hagen.de> <3CC522BA.AF1ECDAC@river-bank.demon.co.uk> Message-ID: <3CC529F7.9020509@hagen.de> Phil Thompson wrote: > Ludger Humbert wrote: > >>Hi Barron, >> >>the actual version at >> >> download/snapshots >> >>is >> sip-3.2rc3.tar.gz >>It builds "out of the box" >>with the usual >> ./configure >> make >> make install >>dance for me. >> > > Excellent. > > >>bs> One note with the SIP make install. I get the following messages: >> ... >>bs> make[2]: Nothing to be done for 'install-exec-am'. >>bs> make[2]: Nothing to be done for 'install-data-am'. >> >>same for me. >> >>bs> Should I be concerned with these? >> >>I don't think so .. but I am not really sure. >> > > Ignore them. > > >>bs> My problem now lies with understanding how to get PyQt installed.... >> >> your problem ... is my problem >> > > Ok - I'm just uploading v3.2rc3 (for MacOS only) to the snapshots > directory. Please let me know if this builds out of the box as well. No ;-(( ./configure runs without problems. But while make runs, there occured the following errors PyQt-3.2rc3 ... qobject.sip: In function `struct PyObject * PyQtGetQObjectPythonClass(const QObj ect *)': qobject.sip:655: ANSI C++ forbids declaration `sipStringTypeClassMap' with no ty pe qobject.sip:655: parse error before `[' qobject.sip: At top level: qobject.sip:859: ANSI C++ forbids declaration `cls' with no type qobject.sip:859: conflicting types for `int cls' qobject.sip:857: previous declaration as `struct PyObject * cls' qobject.sip:859: `qobj' was not declared in this scope qobject.sip:859: `map' was not declared in this scope qobject.sip:860: `map' was not declared in this scope qobject.sip:860: `map' was not declared in this scope qobject.sip:860: implicit declaration of function `int sipMapStringToClass(...)' qobject.sip:862: parse error before `if' make[2]: *** [qtcmodule.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Ludger From tonyc at bellsouth.net Tue Apr 23 12:01:00 2002 From: tonyc at bellsouth.net (Tony Corrente) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Problem with Destroy ??? Message-ID: <1019555780.1501.15.camel@localhost> Hello, I'm running into a problem. I've created a small test dialog. The user types something in, clicks the button and it returns a result. The form works if I just run it. If I load it as a module then use xx = prog() it works the first time. The second time I use xx = prog() I get X Error: BadPixmap (invalid Pixmap parameter) 4 Major opcode: 56 Resource id: 0x3c00018 X Error: BadPixmap (invalid Pixmap parameter) 4 Major opcode: 56 Resource id: 0x3c00018 the image of the pushbutton is black and the form does not work. I then tried to attach the destroy signal to the form and print a message. After I did this, when I clicked the button , I get a core dump. If I comment out the signal, I don't get the core dump. Thanks for any help .. Tony Corrente -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020423/0133a95a/attachment.html From liam_herron at hotmail.com Tue Apr 23 14:05:01 2002 From: liam_herron at hotmail.com (Liam Herron) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Post Build Runtime problems libqtcmodule.so: undefined symbol: static_QUType_ptr Message-ID: I compile the PyQt 3.1 (which takes a long time) when I do a "make install" it gives me the following error: make install-data-hook make[3]: Entering directory `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' (cd /tmp; PYTHONPATH=/usr/local/lib/python2.2/site-packages:/usr/local/lib/python2.2/site-packages /usr/local/bin/python -c "import qt") Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.2/site-packages/qt.py", line 47, in ? import libqtc ImportError: /usr/local/lib/python2.2/site-packages/libqtcmodule.so: undefined symbol: static_QUType_ptr make[3]: *** [install-data-hook] Error 1 make[3]: Leaving directory `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' make[2]: *** [install-data-am] Error 2 make[2]: Leaving directory `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' make[1]: *** [install-am] Error 2 make[1]: Leaving directory `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' make: *** [install-recursive] Error 1 This same undefined symbol error happens when I simply run python and do an "import qt" any ideas? Thanks, Liam _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From humbert at hagen.de Tue Apr 23 18:51:01 2002 From: humbert at hagen.de (Ludger Humbert) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] TNX [SIP 3.2rc3 on Mac OS X builds out of the box] References: <35BD410BA148D411A7ED00508BCFFBDA0C16C871@msgil65170u05.nbk2305.il.ameritech.com> <3CC4FB40.9000609@hagen.de> <3CC522BA.AF1ECDAC@river-bank.demon.co.uk> Message-ID: <3CC590B2.9070305@hagen.de> Phil Thompson wrote: >>the actual version at >> >> download/snapshots >> >>is >> sip-3.2rc3.tar.gz >>It builds "out of the box" >>with the usual >> ./configure >> make >> make install >>dance for me. >> > > Excellent. But ...in the meantime (in between I had to work on other topics) I found some elements, which should be taken into account when trying to automate the linking. --> The produced libs are not correct. Traceback (most recent call last): > File "", line 1, in ? > File "/sw/lib/python2.2/site-packages/qt.py", line 46, in ? > import libsip > ImportError: Inappropriate file type for dynamic loading file /sw/lib/python2.2/site-packages/libsip.9.0.0.dylib /sw/lib/python2.2/site-packages/libsip.9.0.0.dylib: Mach-O dynamically linked shared library ppc This seems due to using the qt-Library installed via fink So I went on and did via command-line in ../siplib c++ -bundle -flat_namespace -undefined suppress -o .libs/libsip.9.0.0.dylib siplib.lo threads.lo qtlib.lo \ objmap.lo moc_sipQt.lo -L/sw/lib -lqt-mt -L/usr/X11R6/lib -lSM -lICE -lX11 -lc -install_name \ /sw/lib/python2.2/site-packages/libsip.9.dylib -compatibility_version 10 -current_version 10.0 The produced file has the correct file type: /sw/lib/python2.2/site-packages/libsip.9.0.0.dylib: Mach-O bundle ppc It now is possible to run python and import libsip [localhost:~/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2] hum% python Python 2.2.1 (#1, Apr 18 2002, 23:40:34) [GCC 2.95.2 19991024 (release)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import libsip >>> TNX again Ludger From humbert at hagen.de Tue Apr 23 22:27:00 2002 From: humbert at hagen.de (Ludger Humbert) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] TNX .. problems downgraded, but ... References: <35BD410BA148D411A7ED00508BCFFBDA0C16C871@msgil65170u05.nbk2305.il.ameritech.com> <3CC4FB40.9000609@hagen.de> <3CC522BA.AF1ECDAC@river-bank.demon.co.uk> <3CC590B2.9070305@hagen.de> Message-ID: <3CC5C37A.7080008@hagen.de> Hi, in the meantime installing sip was successful. First steps in installing PyQt are successful to. But some problems remain. [localhost:~/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2] hum% python Python 2.2.1 (#1, Apr 18 2002, 23:40:34) [GCC 2.95.2 19991024 (release)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import libsip >>> this is ok now ... after changing form -dynamiclib to -bundle in the central Makefile of PyQt running make ... and make install [localhost:~/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2] hum% file /sw/lib/python2.2/site-packages/libq* /sw/lib/python2.2/site-packages/libqtcmodule-3.2.dylib: Mach-O bundle ppc /sw/lib/python2.2/site-packages/libqtcmodule-3.2.so: symbolic link to libqtcmodule-3.2.dylib /sw/lib/python2.2/site-packages/libqtcmodule.dylib: symbolic link to libqtcmodule-3.2.dylib /sw/lib/python2.2/site-packages/libqtcmodule.la: English text /sw/lib/python2.2/site-packages/libqtcmodule.so: symbolic link to libqtcmodule-3.2.so [localhost:~/SOFTWARE/AUSGEPACKT] hum% python Python 2.2.1 (#1, Apr 18 2002, 23:40:34) [GCC 2.95.2 19991024 (release)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import qt >>> Hey, .. this works ;-) --------------------------------------------------------------------------------------------------- but now >>> from struktcanvas import * Traceback (most recent call last): File "", line 1, in ? File "struktcanvas.py", line 27, in ? class StruktCanvas(QCanvasView): NameError: name 'QCanvasView' is not defined >>> --------------------------------------------------------------------------------------------------- this is due to some errors while linking: [localhost:SOFTWARE/AUSGEPACKT/PyQt-3.2rc2] root# make install ... Making install in qtcanvas c++ -E -I/sw/include/python2.2 -I/sw/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -I.. sipqtcanvasProxyqtcanvas.h >moc_sipqtcanvasProxyqtcanvas.h sipqtcanvasProxyqtcanvas.h:39: undefined type, found `class' sipqtcanvasProxyqtcanvas.h:39: illegal external declaration, missing `;' after `sipProxyqtcanvas' sipqtcanvasProxyqtcanvas.h:39: undefined type, found `public' sipqtcanvasProxyqtcanvas.h:39: illegal external declaration, missing `;' after `sipProxy' sipqtcanvasProxyqtcanvas.h:41: undefined type, found `Q_OBJECT' sipqtcanvasProxyqtcanvas.h:43: illegal external declaration, missing `;' after `public' sipqtcanvasProxyqtcanvas.h:46: undefined type, found `public' sipqtcanvasProxyqtcanvas.h:46: illegal external declaration, missing `;' after `slots' sipqtcanvasProxyqtcanvas.h:48: undefined type, found `QObject' cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode /sw/bin/moc -o sipqtcanvasProxyqtcanvas.moc moc_sipqtcanvasProxyqtcanvas.h /bin/sh ../libtool --mode=link c++ -fno-exceptions -O2 -o libqtcanvascmodule.la -rpath /sw/lib/python2.2/site-packages -release 3.2 qtcanvascmodule.lo sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo -L../qt -lqtcmodule -L/sw/lib/python2.2/site-packages -L/sw/lib -lsip -lqt-mt -L/usr/X11R6/lib -lSM -lICE -lX11 rm -fr .libs/libqtcanvascmodule.la .libs/libqtcanvascmodule.* .libs/libqtcanvascmodule-3.2.* *** Warning: This library needs some functionality provided by -lqtcmodule. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: This library needs some functionality provided by -lsip. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. ../libtool: parse error: condition expected: xno = [3183] c++ -bundle -flat_namespace -undefined suppress -o .libs/libqtcanvascmodule-3.2.dylib qtcanvascmodule.lo sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo -L/usr/X11R6/lib -L/sw/lib -L/sw/lib/python2.2/site-packages -L/Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qt -L/Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qt/.libs -lqt-mt -lSM -lICE -lX11 -lc -install_name /sw/lib/python2.2/site-packages/libqtcanvascmodule-3.2.dylib (cd .libs && rm -f libqtcanvascmodule.dylib && ln -s libqtcanvascmodule-3.2.dylib libqtcanvascmodule.dylib) /Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qtcanvas/.libs creating libqtcanvascmodule.la (cd .libs && rm -f libqtcanvascmodule.la && ln -s ../libqtcanvascmodule.la libqtcanvascmodule.la) /Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qtcanvas/.libs /bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages /bin/sh ../libtool --mode=install /usr/bin/install -c libqtcanvascmodule.la /sw/lib/python2.2/site-packages/libqtcanvascmodule.la libtool: install: warning: relinking `libqtcanvascmodule.la' cd /Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qtcanvas; /bin/sh ../libtool --mode=relink c++ -fno-exceptions -O2 -o libqtcanvascmodule.la -rpath /sw/lib/python2.2/site-packages -release 3.2 qtcanvascmodule.lo sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo -L../qt -lqtcmodule -L/sw/lib/python2.2/site-packages -L/sw/lib -lsip -lqt-mt -L/usr/X11R6/lib -lSM -lICE -lX11 /Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qtcanvas/.libs ../libtool: parse error: condition expected: xno = [3183] c++ -bundle -flat_namespace -undefined suppress -o .libs/libqtcanvascmodule-3.2.dylib qtcanvascmodule.lo sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo -L/usr/X11R6/lib -L/sw/lib -L/sw/lib/python2.2/site-packages -L/Users/hum/SOFTWARE/AUSGEPACKT/PyQt-3.2rc2/qt /sw/lib/python2.2/site-packages/libqtcmodule.dylib /sw/lib/python2.2/site-packages/libsip.so -lqt-mt -lSM -lICE -lX11 -lc -install_name /sw/lib/python2.2/site-packages/libqtcanvascmodule-3.2.dylib /usr/bin/ld: /sw/lib/python2.2/site-packages/libqtcmodule.dylib is input for the dynamic link editor, is not relocatable by the static link editor again /usr/bin/ld: /sw/lib/python2.2/site-packages/libsip.so is input for the dynamic link editor, is not relocatable by the static link editor again libtool: install: error: relink `libqtcanvascmodule.la' with the above command before installing it ---------------------------------------------------------------------- Libraries have been installed in: /sw/lib/python2.2/site-packages If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable during execution See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages /usr/bin/install -c -m 644 qtcanvas.py /sw/lib/python2.2/site-packages/qtcanvas.py make install-data-hook (cd /tmp; PYTHONPATH=/sw/lib/python2.2/site-packages:/sw/lib/python2.2/site-packages /Users/hum/bin/python -c "import qtcanvas") Traceback (most recent call last): File "", line 1, in ? File "/sw/lib/python2.2/site-packages/qtcanvas.py", line 41, in ? import libqtcanvasc ImportError: No module named libqtcanvasc make[3]: *** [install-data-hook] Error 1 make[2]: *** [install-data-am] Error 2 make[1]: *** [install-am] Error 2 make: *** [install-recursive] Error 1 I want the remaining errors to go away. Please give help a change ;-) Ludger From humbert at hagen.de Tue Apr 23 23:29:00 2002 From: humbert at hagen.de (Ludger Humbert) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] TNX [PyQt on Mac OS X builds after fiddeling around with -bundle] Message-ID: <3CC5BCAA.4010805@hagen.de> For your Information ~~~~~~~~~~~~~~~~~~ Dimitri's answer to my problems in getting installed PyQt on Mac OS X: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Are you compiling PyQt 3.2rc2? > > Yes. > > > > Qt/Mac defines Q_WS_MAC while Qt/X11 from Fink probably defines > > Q_WS_X11 instead. > > I use > Qt/X11 from > Fink. > So I had to change the mentioned line in the source -- otherwise I got > the problem. Aaaah... OK. You know, you should tell Phil Thompson or (better) the mailing list about that, otherwise Phil Thompson won't know about this issue and won't fix it. > In the meantime I looked at > libsip.9.0.0.so > It is a > Mach-O dynamically linked shared libraray ppc > file. Is this ok? No, I don't think it's OK. libsip should be a module (or bundle), not a shared library. SIP 3.2rc3 was supposed to fix this, but it maybe didn't. This is why I had asked whether SIP uses "-bundle" instead of "-dynamiclib" when linking the Python modules. I guess it doesn't. You should double check that. > Because, in Python > import libsip > throws the error: > Inappropriate file type for dynamic loading On the other hand Python expects a module named libsip.so module, not libsip.9.0.0.so. Make sure that there's a libsip.so in the Python subdirectories. > What do you think about this? You're in one of the above two situations. You'll have to check which one: - Is "-bundle" used when linking? - Is there a libsip.so file in Python? Dimitri ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ongoing ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ After changing the link process for sip (again), I could do an import for libsip in Python. So *this* works (for sip-3.2rc2 __not__ rc 3!), if you change the c++ -dynamiclib ... to c++ -bundle ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the meantime I changed (by hand) in the directory PyQt-32.rc2 the -dynamiclib in the configure made Makefile to -bundle and now the compile/link-process is running, it will take a while to complete ... Hopeful, I'll succeed. I want to thank all the guys, who made this process possible. Thank you so very much. Ludger From phil at river-bank.demon.co.uk Wed Apr 24 07:08:00 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] TNX [SIP 3.2rc3 on Mac OS X builds out of the box] References: <35BD410BA148D411A7ED00508BCFFBDA0C16C871@msgil65170u05.nbk2305.il.ameritech.com> <3CC4FB40.9000609@hagen.de> Message-ID: <3CC522BA.AF1ECDAC@river-bank.demon.co.uk> Ludger Humbert wrote: > > Hi Barron, > > the actual version at > > download/snapshots > > is > sip-3.2rc3.tar.gz > It builds "out of the box" > with the usual > ./configure > make > make install > dance for me. Excellent. > bs> One note with the SIP make install. I get the following messages: > ... > bs> make[2]: Nothing to be done for 'install-exec-am'. > bs> make[2]: Nothing to be done for 'install-data-am'. > > same for me. > > bs> Should I be concerned with these? > > I don't think so .. but I am not really sure. Ignore them. > bs> My problem now lies with understanding how to get PyQt installed.... > > your problem ... is my problem Ok - I'm just uploading v3.2rc3 (for MacOS only) to the snapshots directory. Please let me know if this builds out of the box as well. Thanks, Phil From dts at iti-oh.com Wed Apr 24 16:07:01 2002 From: dts at iti-oh.com (Smith, Dave) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] I have a SIPping problem? Message-ID: <89440AF60A07D6118B8100805FA6F07B50E72D@ntserver3.iti-oh.com> I'm trying my hand at wrapping a C++ class derived from QWidget and not having much luck with SIP. I've seen some postings on this list that discuss the same error but I wasn't able to determine if there was a resolution or not... Any help would be appreciated!!! The problem: Trying to SIP a very simple C++ class that derives from QWidget (see attached test.sip, I think test.h and test.cxx are simple enough to leave to the imagination) results in the following error: $ sip -c sip test.sip sip: QWidget has not been defined. NOTE: I was able to use SIP to successfully create a working siptest python module before I added the QWidget stuff. I have tried specifying -t Qt_3_0_2 -t WS_X11 and messing with the -I option (it is not at all clear to me what includes sip might require, and I suspect this might be my problem). Any idea what I'm missing? I am using Qt 3.0.2, sip-3.1, and PyQt-3.1 on Solaris 2.8 (w/ Python 2.0) and Windows 2000 (w/ Python 2.2). Dave <> -------------- next part -------------- A non-text attachment was scrubbed... Name: test.sip Type: application/octet-stream Size: 404 bytes Desc: test.sip Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020424/ca3a7b1c/test.obj From korpios at korpios.com Wed Apr 24 16:12:01 2002 From: korpios at korpios.com (Tom 'Korpios' Tobin) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Issue With PyQt, Sharp Zaurus/Qtopia, and QMenuBar Message-ID: <20020424101448.A4921@hecate.korpios.net> After installing the Python IPK files currently listed on the Riverbank Computing website - python_2.2-1.2_arm.ipk and pyqt_3.1-1.0_arm.ipk - on my Sharp Zaurus SL-5500, I have noticed a problem with the QMenuBar class. The problem seems to be that anytime a QMenuBar is used, the application crashes, usually with a segmentation fault. This crash typically occurs as soon as the cursor is brought into and out of a QMenuBar region; on the Zaurus, some such scripts simply return to the command line without giving any visible output (errors, application, or otherwise). No other UI components have caused this problem thus far. The problem seems to occur both when writing my own code and when attempting to use example code. QMenuBar components used by C++ applications seem to work fine. The crash still seems to occur whether using qt.Application or qtpe.QPEApplication as the base. I have duplicated the problem several times both with my SL-5500 and with Sharp's Qtopia desktop development environment. If I use the equivalent code outside of the Qtopia environment (i.e. in a normal desktop Python/PyQt setting), everything works normally. I have been trying to cross-compile PyQt based on the latest snapshots to see if this resolves the problem; I haven't had any luck with the compile process so far, as it breaks both on a cross-compile and a standard compile early on with errors such as the following: g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/opt/Python/sip-3.2rc2-i686/siplib -I/opt/Qtopia/include -DQWS -I/usr/X11R6/include -fno-exceptions -fno-rtti -O2 -c qtcmodule.cpp -fPIC -DPIC -o qtcmodule.lo qtcmodule.cpp: In function `struct PyObject * sipDo_qt_xrootwin(PyObject *, PyObject *)': qtcmodule.cpp:5803: implicit declaration of function `int qt_xrootwin(...)' qtcmodule.cpp: In function `struct PyObject * sipDo_qt_xscreen(PyObject *, PyObject *)': qtcmodule.cpp:5827: implicit declaration of function `int qt_xscreen(...)' qtcmodule.cpp: In function `struct PyObject * sipDo_qt_xdisplay(PyObject *, PyObject *)': qtcmodule.cpp:5851: implicit declaration of function `int qt_xdisplay(...)' qtcmodule.cpp:5851: assignment to `void *' from `int' lacks a cast make[2]: *** [qtcmodule.lo] Error 1 (The odd sip directory is just where I've left the libraries for now.) I am truly puzzled; I have tried searching for a solution for several days now with no luck. If anyone can actually run a Python script under Qtopia (on the Zaurus or otherwise) and implement QMenuBar without the script crashing, could you pass along an example? Thank you for your time, Tom Tobin korpios@korpios.com From ygingras at kubiktech.com Thu Apr 25 00:14:00 2002 From: ygingras at kubiktech.com (Yannick Gingras) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] can't typedef a uint ? Message-ID: <20020424211136.33FDF33986@LINPDC.eclipsys.qc.ca> I have the following typedefs in a .sip file : typedef unsigned long ulong; typedef unsigned char byte; typedef unsigned short ushort; but sip refuse this one : typedef unsigned int uint; with the following error : sip: typedefs.sip:4: parse error My sip version is 3.1 . Anyone has a workaround ? Thanks. -- Yannick Gingras Network Programer From tonyc at bellsouth.net Thu Apr 25 12:58:00 2002 From: tonyc at bellsouth.net (Tony Corrente) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Mutex destroy failure: Device or resource busy Message-ID: <200204251253.04256.tonyc@bellsouth.net> Hello, I'm just trying to create a simple re-usable dialog box. Whenever I create the dialog form ( no matter how simple it is) when I load the .py as a module it executes fine the first time. Everytime after that, I get an error after the window closes. Mutex destroy failure: Device or resource busy.. If the form is more complex, it does not render correctly after the first time. Am I doing something wrong? What is the correct way to close the form? I have QObject.connect(app, SIGNAL('lastWindowClosed()'),app, SLOT('quit()')) and after the button is clicked and I set the return value, I execute self.close(). I've even tried self.destroy() Thanks in advance for any help Tony Corrente From barronsnyder at mac.com Thu Apr 25 14:43:01 2002 From: barronsnyder at mac.com (barronsnyder@mac.com) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Status of SIP and PyQt on OS X? In-Reply-To: <3CC5C37A.7080008@hagen.de> Message-ID: Hello, I'm trying to get a handle on where we stand with SIP and PyQt on OS X. It's my understanding that SIP now configures, makes, and installs correctly without modification. Is this true? And now we're trying to figure out a way to get PyQt to do the same. Does PyQt configure or make properly? Thanks, Barron From papadopo at remove.shfj.decoy.cea.fr Thu Apr 25 15:11:00 2002 From: papadopo at remove.shfj.decoy.cea.fr (Dimitri Papadopoulos) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP + PyQt [3.2rc3] on Mac OS X Message-ID: <3CC7FF8C.C6B5F34B@REMOVE.shfj.DECOY.cea.fr> Hi, For those interested, this describes how to build SIP+PyQt on Mac OS X using the following: Mac OS X 10.1.3 I understand 10.1 is suggested by Trolltech: http://www.trolltech.com/developer/platforms/osx.html December 2001 Mac OS X Developer Tools SIP 3.2rc3 http://www.riverbankcomputing.co.uk/download/snapshots/sip-3.2rc1.tar.gz Note that SIP 3.1 has a minor bug that results in a linker error. SIP 3.2rc1 fixes that issue, I suggest you use SIP 3.2rc3. PyQt 3.2rc3 for Mac OS X http://www.riverbankcomputing.co.uk/download/snapshots/PyQt-3.2rc2-Qt-3.0.2-MacX.tar.gz Note that PyQt 3.1 does not disable some X11-only functions and has some problems with casting "unsigned long" to "void*", and that PyQt 3.2rc1 calls other functions declared in the Qt headers but no implemented in the Qt/Mac library. PyQt 3.2rc2 fixes all these issues. PyQt 3.2rc3 has some problems I describe below. I suggest you wait for PyQt 3.2rc4. Qt/Mac evaluation version http://www.trolltech.com/products/qt/evaluate.html Python for Mac OS X http://fink.sourceforge.net/pdb/package.php/python There are two versions of Python for Mac OS X: * the above Python for Mac OS X which can be run from the command line * the traditional MacPython that knows nothing of command lines and UNIX Because MacPython cannot be called from the command line and I couldn't even identify a Python executable, and because PyQt requires the Python executable to be indetified using the --with-python=FILE option, we were not able to configure PyQt with MacPython. See also paragraph "MacOS X command-line interpreter" on this page: http://www.cwi.nl/~jack/macpython.html I suggest you use Python for Mac OS X from Fink. Provided you're using SIP 3.2rc3 and PyQt 3.2rc3, these are the pending issues I'm aware of when building SIP and PyQt on Mac OS X: A) You'll see warnings of the kind described in http://mats.gmd.de/pipermail/pykde/2002-April/002540.html http://mats.gmd.de/pipermail/pykde/2002-April/002555.html and end with: cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode These warnings can be safely ignored. They're the result of a harmless compiler bug: http://www.wxwindows.org/faqmac.htm#smarterrors B) There seems to be a bug in the autoconf build system that's used to build PyQt. As a result the libtool file generated in the top-level directory after running configure is broken. After running configure, please find the line beginning with archive_cmds="\$nonopt \$(test \\"x\$module\\" = xyes and change to archive_cmds="\$nonopt \$(test \"x\$module\" = xyes If you forget this, the build system will build *.dylib shared libraries instead of *.so modules or bundles. C) A bug was introduced in PyQt 3.2rc3, it has already been reported to the mailing list by Ludger Humbert and was also reproduced here: c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/usr/local/qt/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fno-common -DPIC -o qtcmodule.lo qobject.sip: In function `struct PyObject * PyQtGetQObjectPythonClass(const QObject *)': qobject.sip:655: ANSI C++ forbids declaration `sipStringTypeClassMap' with no type qobject.sip:655: parse error before `[' qobject.sip: At top level: qobject.sip:859: ANSI C++ forbids declaration `cls' with no type qobject.sip:859: conflicting types for `int cls' qobject.sip:857: previous declaration as `struct PyObject * cls' qobject.sip:859: `qobj' was not declared in this scope I'm not sure how to fix this right now. OK, that said, here's how to build SIP: 1) First "configure", depending on how Python is set up: ./configure ./configure --with-python=/sw/bin/python ./configure --with-python=/usr/local/python-2.2.1/bin/python 2) Then fix the libtool script in the top-level directory as described in issue B above. 3) Then "make". 4) Then "make install". You should probably be root for that. In any case that's how I work here. The same for building PyQt: 1) First "configure", depending on how Python and Qt are set up: ./configure -with-qtdir=/usr/local/qt --with-python=/sw/bin/python 2) Then fix the libtool script in the top-level directory as described in issue B above. 3) Then "make". You'll hit issue C here. I don't know how to fix this for now. Dimitri From siu99aw at rdg.ac.uk Thu Apr 25 16:04:00 2002 From: siu99aw at rdg.ac.uk (Alex Willmer) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Do sip, PyQT and PyKDE work with KDE 3.0? Message-ID: <200204251504.32977.siu99aw@rdg.ac.uk> Perhaps I'm missing something obvious here and what I'm trying isn't possible, but here goes... As the subject line says, I'm trying to get PyKDE working with KDE 3.0. I've downloaded the older packages PyQt-3.0-Qt-2.3.1 (plus the 2 patches, the first of which mentions a non-existent file), PyKDE2-3.0-generic-beta1 & sip-3.0 according to the instructions at the PyKDE download page. Sip 3.0 has been installed without error. All rpm versions of sip and PyQt have been removed from my system (Mandrake 8.2 with KDE 3.0 final if it's relevant). However I can't get PyQt to build, is this version compatible with QT 3.0.x? The test of QT_VERSION in the configure script would suggest not, but it is needed for KDE 3.0.x and there is a PyKDE2 below for BETA2. I've altered the QT_VERSION check to allow qt 3.0.3, but make fails with the following error: make[1]: Entering directory `/home/alex/stuff/software/python/PyQt-3.0' Making all in qt make[2]: Entering directory `/home/alex/stuff/software/python/PyQt-3.0/qt' /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/local/include/sip -I/usr/lib/qt3/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c -o qtcmodule.lo `test -f qtcmodule.cpp || echo './'`qtcmodule.cpp g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/local/include/sip -I/usr/lib/qt3/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fPIC -DPIC -o qtcmodule.lo In file included from sipqtQMultiLineEdit.h:40, from qtcmodule.cpp:152: qtableview.sip:68:24: qtableview.h: No such file or directory make[2]: *** [qtcmodule.lo] Error 1 make[2]: Leaving directory `/home/alex/stuff/software/python/PyQt-3.0/qt' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/alex/stuff/software/python/PyQt-3.0' make: *** [all] Error 2 What is the answer here? Does PyKDE2 work with KDE 3.0? Is the page at http://www.riverbankcomputing.co.uk/pykde/download.php correct? Sincerely Alex -- Alex Willmer mailto:siu99aw@rdg.ac.uk From jbublitz at nwinternet.com Thu Apr 25 16:24:00 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] [PyKDE]Re: I have a SIPping problem? In-Reply-To: <20020425100000.19043.30974.Mailman@mats> Message-ID: On 25-Apr-02 "Smith, Dave" wrote: > I'm trying my hand at wrapping a C++ class derived from QWidget > and not having much luck with SIP. I've seen some postings on > this list that discuss the same error but I wasn't able to > determine if there was a resolution or not... Any help would be > appreciated!!! > The problem: > Trying to SIP a very simple C++ class that derives from > QWidget (see attached test.sip, I think test.h and test.cxx > are simple enough to leave to the imagination) results in the > following error: > $ sip -c sip test.sip > sip: QWidget has not been defined. > NOTE: I was able to use SIP to successfully create a working > siptest python module before I added the QWidget stuff. > I have tried specifying -t Qt_3_0_2 -t WS_X11 Correct (for Solaris --- -t WS_WIN for Windows). > and messing with the -I option (it is not at all clear to me > what includes sip might require, and I suspect this might be > my problem). You need -I > Any idea what I'm missing? add %Import qtmod.sip after the %Module statement. sip needs to see .sip files that resolve everything back to C++ base types (the same as C++ would need to see the entire object hierarchy to compile), so it needs to see at least qwidget.sip and qobject.sip, plus anything else QWidget depends on in Qt. You could also just %Include the PyQt .sip files you need if it's only a few (instead of importing all of PyQt) - that may be a little more complicated than it first appears because of versioning/platform/features requirements. sip will generate .h files for all of the Qt sip files in your output directory, but no additional .cpp files. You'll also need to link to libqtcmodule.so and libsip.so (in python/site-packages on Linux), which is why you need the PyQt .h files. I can't advise you on what Windows requires since I don't use it, but it's basically similar. Jim From bs1535 at sbc.com Thu Apr 25 16:58:00 2002 From: bs1535 at sbc.com (SNYDER, BARRON F (AIT)) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Building SIP + PyQt [3.2rc3] on Mac OS X Message-ID: <35BD410BA148D411A7ED00508BCFFBDA0C16C882@msgil65170u05.nbk2305.il.ameritech.com> Thanks Dimitri! You've documented the build process and problems very well! I appreciate your efforts. (And yours too Ludger!) Hopefully we can get these last issues straightened out soon and start using these great tools on OS X! Barron -----Original Message----- From: Dimitri Papadopoulos Sent: Thursday, April 25, 2002 8:07 AM To: pykde@mats.gmd.de Subject: [PyKDE] Building SIP + PyQt [3.2rc3] on Mac OS X Hi, For those interested, this describes how to build SIP+PyQt on Mac OS X using the following: Mac OS X 10.1.3 I understand 10.1 is suggested by Trolltech: http://www.trolltech.com/developer/platforms/osx.html December 2001 Mac OS X Developer Tools SIP 3.2rc3 http://www.riverbankcomputing.co.uk/download/snapshots/sip-3.2rc1.tar.gz Note that SIP 3.1 has a minor bug that results in a linker error. SIP 3.2rc1 fixes that issue, I suggest you use SIP 3.2rc3. PyQt 3.2rc3 for Mac OS X http://www.riverbankcomputing.co.uk/download/snapshots/PyQt-3.2rc2-Qt-3.0.2- MacX.tar.gz Note that PyQt 3.1 does not disable some X11-only functions and has some problems with casting "unsigned long" to "void*", and that PyQt 3.2rc1 calls other functions declared in the Qt headers but no implemented in the Qt/Mac library. PyQt 3.2rc2 fixes all these issues. PyQt 3.2rc3 has some problems I describe below. I suggest you wait for PyQt 3.2rc4. Qt/Mac evaluation version http://www.trolltech.com/products/qt/evaluate.html Python for Mac OS X http://fink.sourceforge.net/pdb/package.php/python There are two versions of Python for Mac OS X: * the above Python for Mac OS X which can be run from the command line * the traditional MacPython that knows nothing of command lines and UNIX Because MacPython cannot be called from the command line and I couldn't even identify a Python executable, and because PyQt requires the Python executable to be indetified using the --with-python=FILE option, we were not able to configure PyQt with MacPython. See also paragraph "MacOS X command-line interpreter" on this page: http://www.cwi.nl/~jack/macpython.html I suggest you use Python for Mac OS X from Fink. Provided you're using SIP 3.2rc3 and PyQt 3.2rc3, these are the pending issues I'm aware of when building SIP and PyQt on Mac OS X: A) You'll see warnings of the kind described in http://mats.gmd.de/pipermail/pykde/2002-April/002540.html http://mats.gmd.de/pipermail/pykde/2002-April/002555.html and end with: cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode These warnings can be safely ignored. They're the result of a harmless compiler bug: http://www.wxwindows.org/faqmac.htm#smarterrors B) There seems to be a bug in the autoconf build system that's used to build PyQt. As a result the libtool file generated in the top-level directory after running configure is broken. After running configure, please find the line beginning with archive_cmds="\$nonopt \$(test \\"x\$module\\" = xyes and change to archive_cmds="\$nonopt \$(test \"x\$module\" = xyes If you forget this, the build system will build *.dylib shared libraries instead of *.so modules or bundles. C) A bug was introduced in PyQt 3.2rc3, it has already been reported to the mailing list by Ludger Humbert and was also reproduced here: c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/usr/local/qt/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fno-common -DPIC -o qtcmodule.lo qobject.sip: In function `struct PyObject * PyQtGetQObjectPythonClass(const QObject *)': qobject.sip:655: ANSI C++ forbids declaration `sipStringTypeClassMap' with no type qobject.sip:655: parse error before `[' qobject.sip: At top level: qobject.sip:859: ANSI C++ forbids declaration `cls' with no type qobject.sip:859: conflicting types for `int cls' qobject.sip:857: previous declaration as `struct PyObject * cls' qobject.sip:859: `qobj' was not declared in this scope I'm not sure how to fix this right now. OK, that said, here's how to build SIP: 1) First "configure", depending on how Python is set up: ./configure ./configure --with-python=/sw/bin/python ./configure --with-python=/usr/local/python-2.2.1/bin/python 2) Then fix the libtool script in the top-level directory as described in issue B above. 3) Then "make". 4) Then "make install". You should probably be root for that. In any case that's how I work here. The same for building PyQt: 1) First "configure", depending on how Python and Qt are set up: ./configure -with-qtdir=/usr/local/qt --with-python=/sw/bin/python 2) Then fix the libtool script in the top-level directory as described in issue B above. 3) Then "make". You'll hit issue C here. I don't know how to fix this for now. Dimitri From boud at valdyas.org Thu Apr 25 20:32:00 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:35 2007 Subject: [PyKDE] Mutex destroy failure: Device or resource busy In-Reply-To: <200204251253.04256.tonyc@bellsouth.net> References: <200204251253.04256.tonyc@bellsouth.net> Message-ID: <200204252030.50108.boud@valdyas.org> On Thursday 25 April 2002 12:53, Tony Corrente wrote: > Hello, > > I'm just trying to create a simple re-usable dialog box. Whenever I create > the dialog form ( no matter how simple it is) when I load the .py as a > module it executes fine the first time. Everytime after that, I get an > error after the window closes. > > Mutex destroy failure: Device or resource busy.. > From alh at jenkon.com Thu Apr 25 22:22:01 2002 From: alh at jenkon.com (alh@jenkon.com) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] QApplication.notify gets QObject receiver arg Message-ID: Howdy, I have some interesting behavior that Environment is Win2000, Python 2.1.3, Qt 3.0.3, PyQt 3.1. Console: C:\>python test.py focus-in open <__main__.TestWin instance at 0080AF34> focus-in focus-in focus-in focus-in close <__main__.TestWin instance at 0080AF34> open <__main__.TestWin instance at 0080AF34> focus-in focus-in focus-in focus-in close <__main__.TestWin instance at 0080AF34> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> import sys import qt class App(qt.QApplication): def notify(self, receiver, event): if event.type() == qt.QEvent.FocusIn: print 'focus-in', receiver return qt.QApplication.notify(self, receiver, event) class MainWin(qt.QMainWindow): def __init__(self): qt.QMainWindow.__init__(self) self.wnd = None btn = qt.QPushButton('Click', self) btn.resize(btn.sizeHint()) self.connect(btn, qt.SIGNAL('clicked()'), self.toggleWindow) def toggleWindow(self): if self.wnd: print 'close', self.wnd self.wnd.close(1) self.wnd = None else: self.wnd = TestWin() print 'open', self.wnd self.wnd.show() class TestWin(qt.QMainWindow): def __init__(self): qt.QMainWindow.__init__(self) main = qt.QWidget(self) self.setCentralWidget(main) layout = qt.QVBoxLayout(main) layout.addWidget(qt.QLineEdit(main)) layout.addWidget(qt.QLineEdit(main)) if __name__ == '__main__': app = App(sys.argv) win = MainWin() win.show() app.connect(app, qt.SIGNAL('lastWindowClosed()'), app, qt.SLOT('quit()')) app.exec_loop() <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< From alh at jenkon.com Thu Apr 25 22:25:00 2002 From: alh at jenkon.com (alh@jenkon.com) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Re: QApplication.notify gets QObject receiver arg Message-ID: Oops, please disregard premature send of last email. I'll fix it up & resend. Alan From alh at jenkon.com Thu Apr 25 23:06:00 2002 From: alh at jenkon.com (alh@jenkon.com) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] QApplication.notify gets QObject receiver args Message-ID: Howdy, I've encountered some mysterious behavior under PyQt. While watching receiver/event args in a qt.QApplication.notify override, the first time a window is created/opened, the receiver arg (for focus events on the new window) is an instance of qt.QLineEdit. The second time the same type of window is created/opened, the receiver arg is a qt.QObject instance (instead of the expected qt.QLineEdit). Environment is Win2000, Python 2.1.3, Qt 3.0.3, PyQt 3.1. For example, run the code below (which opens a window w/ a "Click" button). -- Click the "Click" button, opening a second window with two line-edit controls. -- Tab twice, alternating focus between the two line-edits; notice that the receiver of the FocusIn events are instances of qt.QLineEdit. -- Click the "Click" button, closing the second window. -- Click the "Click" button to create a new instance of the second window. -- Tab twice again; notice that this time, the receiver of the FocusIn events are instances of qt.QObject! Here's the corresponding console transcript: C:\>python test.py focus-in open <__main__.TestWin instance at 0080AF34> focus-in focus-in focus-in focus-in close <__main__.TestWin instance at 0080AF34> open <__main__.TestWin instance at 0080AF34> focus-in focus-in focus-in focus-in close <__main__.TestWin instance at 0080AF34> In the real application that displays similar behavior, it is important to be able to identify the receivers as the appropriate qt.QLineEdit instances--if references are maintained to the qt.QLineEdit instances, it doesn't appear possible to associate the qt.QObject instances with the qt.QLineEdit instances. Isn't it odd that both instances of the second window have the same str()? (Tight memory management?) Any help is greatly appreciated, Alan Harkreader >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> import sys import qt class App(qt.QApplication): def notify(self, receiver, event): if event.type() == qt.QEvent.FocusIn: print 'focus-in', receiver return qt.QApplication.notify(self, receiver, event) class MainWin(qt.QMainWindow): def __init__(self): qt.QMainWindow.__init__(self) self.wnd = None btn = qt.QPushButton('Click', self) btn.resize(btn.sizeHint()) self.connect(btn, qt.SIGNAL('clicked()'), self.toggleWindow) def toggleWindow(self): if self.wnd: print 'close', self.wnd self.wnd.close(1) self.wnd = None else: self.wnd = TestWin() print 'open', self.wnd self.wnd.show() class TestWin(qt.QMainWindow): def __init__(self): qt.QMainWindow.__init__(self) main = qt.QWidget(self) self.setCentralWidget(main) layout = qt.QVBoxLayout(main) layout.addWidget(qt.QLineEdit(main)) layout.addWidget(qt.QLineEdit(main)) if __name__ == '__main__': app = App(sys.argv) win = MainWin() win.show() app.connect(app, qt.SIGNAL('lastWindowClosed()'), app, qt.SLOT('quit()')) app.exec_loop() <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< From boud at valdyas.org Thu Apr 25 23:14:00 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Problem with Destroy ??? In-Reply-To: <1019555780.1501.15.camel@localhost> References: <1019555780.1501.15.camel@localhost> Message-ID: <200204252313.04210.boud@valdyas.org> On Thursday 25 April 2002 22:53, Tony Corrente wrote: > Hello, > > I know this has to be something stupid I'm doing wrong... I'm not sure. I might have a bad day, but your example leads to a segfault on my computer... Oh, wait, I've succeeded in messing up my PyQt 3.x installation again. I'll report back tomorrow, when it's compiled again :-(. (Resent to the mailing list. Somehow, my sendmail and Tony's sendmail don't agree on his existence... ... while talking to mx01.mail.bellsouth.net.: >>> DATA <<< 550 .net 003: you are not allowed to send e-mail to 550 5.1.1 ... User unknown <<< 503 No recipients specified -- Boudewijn Rempt | http://www.valdyas.org From jbublitz at nwinternet.com Fri Apr 26 01:55:00 2002 From: jbublitz at nwinternet.com (Jim Bublitz) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [PyKDE]Re: Do sip, PyQT and PyKDE work with KDE 3.0? In-Reply-To: <20020425211400.29223.7567.Mailman@mats> Message-ID: On 25-Apr-02 Alex Willmer wrote: > Perhaps I'm missing something obvious here and what I'm trying > isn't possible, but here goes... > As the subject line says, I'm trying to get PyKDE working with > KDE 3.0. I've downloaded the older packages PyQt-3.0-Qt-2.3.1 > (plus the 2 patches, the first of which mentions a non-existent > file), PyKDE2-3.0-generic-beta1 & sip-3.0 according to the > instructions at the PyKDE download page. > What is the answer here? Does PyKDE2 work with KDE 3.0? Is the > page at http://www.riverbankcomputing.co.uk/pykde/download.php > correct? There currently isn't a version of PyKDE2 that builds with KDE 3.0 final - the last release builds with KDE3.0beta2, but there were major changes between the beta and final. I was shooting for an updated release of PyKDE2 this weekend, but it looks like it will be a little later than that. As of right now, I'm building PyKDE2 to sip 3.1-and-a-half - there was a 3.1 bug I needed fixed (namespaces), but I haven't switched over to 3.2 yet. I patched my 3.1 and Phil has already comitted the patch to CVS. I'm also rewriting the build system, so that adds a little extra complication (and makes me reluctant to switch sip versions until I get the current file set working - there are changes needed for the threading fixes in sip 3.2 also). To stay in sync, the PyKDE2 release won't be out until sip 3.2 is also released, but that should happen pretty soon also - PyKDE2 will probably follow sip 3.2 by a day or two. If Mandrake 8.2 is using gcc2.96 (I believe 8.2beta was), there are compile problems in the currently available releases related to that which should also be fixed in the next release. Quite honestly, the time to work on PyKDE2 just hasn't been available until today, and will be a little short next week too, but I don't have a lot left to do to get a release in shape. Jim From aleax at aleax.it Fri Apr 26 12:55:01 2002 From: aleax at aleax.it (Alex Martelli) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] mdk 8.2's gcc In-Reply-To: <20020426100000.7040.34776.Mailman@mats> References: <20020426100000.7040.34776.Mailman@mats> Message-ID: <200204261054.MAA32434@mail.gmd.de> > If Mandrake 8.2 is using gcc2.96 (I believe 8.2beta was), there are Yep, I just installed 8.2 and it still defaults to 2.96: [root@lancelot netraverse_installer]# gcc -v Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/specs gcc version 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk) There's an optional 3.0.4 around too, but I think it's not considered yet stable/production (just like KDE 3 isn't...) by Mandrakers: gcc version 3.0.4 (Mandrake Linux 8.2 3.0.4-2mdk) Alex From aleax at aleax.it Fri Apr 26 16:55:00 2002 From: aleax at aleax.it (Alex Martelli) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] hardcoded :0.0 in creation of QApplication on Xlib...? Message-ID: <200204261454.QAA22996@mail.gmd.de> I'm running PyQt apps remotely -- on a Linux machine (Debian if it matters) to which I'm connecting over the internet via ssh from my own Linux machine (Mandrake 8.2 if it matters). ssh is channeling X too. And it channels it OK: environment variable DISPLAY is set to theremotemachine:11.0 and the whole PyQt apps ARE using that DISPLAY just fine... *except* at the very moment I create the QApplication object. Then, and only then, I get two error messages from Xlib: Xlib: connection to ":0.0" refused by server Xlib: Client is not authorized to connect to Server I've confirmed that these are indeed emitted exactly when I call qt.QApplication(sys.argv) . I even tried faking up a -display X:Y.0 by appending to sys.argv -- these error messages still appear, and everything else still seems to work. PyQt, SIP and Qt all recent versions -- 3.0.3 for Qt in specific. Any suggestions for fixes and/or workarounds? I don't understand why this ":0.0" should apparently be "hard-wired" in Qt's QApplication -- it does not seem to be doing any real harm (as far as I can tell) but I definitely wouldn't want to leave this for end-users to see by the time we package up and start distributing this app's beta, as it looks quite uncool. So, I'll gladly try whatever kludge you guys can come up with... advthanksance! Alex From alh at jenkon.com Fri Apr 26 21:18:00 2002 From: alh at jenkon.com (Alan Harkreader) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] QApplication.notify gets QObject receiver args In-Reply-To: Message-ID: Update: Extending qt.QApplication & overriding notify appears to cause a memory leak. Details: We discovered that the original code sample I posted also displays a memory leak (with which we have also been struggling). In the course of investigating that, I've simplified the example code (minimizing py<->qt interaction) & found that the memory leak is due to extending qt.QApplication and overriding notify. The code below demonstrates this, in addition to the original complaint of args tending toward QObjects. Memory does not seem to leak if class App is stubbed-out (i.e., class App(qt.QApplication): pass). Now to isolate the leak... Alan Harkreader ################################################################## import sys import qt class App(qt.QApplication): def notify(self, receiver, event): if event.type() == qt.QEvent.FocusIn: print 'focus-in', receiver return qt.QApplication.notify(self, receiver, event) class Toggle: wnd = None def __call__(self): if self.wnd: print 'close', self.wnd self.wnd.close(1) self.wnd = None else: self.wnd = qt.QMainWindow() main = qt.QWidget(self.wnd) self.wnd.setCentralWidget(main) layout = qt.QVBoxLayout(main) layout.addWidget(qt.QLineEdit(main)) layout.addWidget(qt.QLineEdit(main)) self.wnd.show() print 'open', self.wnd Toggle = Toggle() if __name__ == '__main__': app = App(sys.argv) wnd = qt.QMainWindow() btn = qt.QPushButton('Click', wnd) btn.resize(btn.sizeHint()) btn.connect(btn, qt.SIGNAL('clicked()'), Toggle) wnd.show() app.connect(app, qt.SIGNAL('lastWindowClosed()'), app, qt.SLOT('quit()')) app.exec_loop() From laytonjb at bellsouth.net Sat Apr 27 14:51:00 2002 From: laytonjb at bellsouth.net (Jeff Layton) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Looking for Basic QTable example Message-ID: <3CCA8F4C.5F5A83D3@bellsouth.net> Good morning, I got PyQT 3.1 built on my Linux box thanks to Phil (Thanks Phil!) and I'm working my way through Boudewijn's book (very good book BTW). However, I'd like to start playing with QTable. I tried a few quick things with no luck and searched around the web for some very basic examples without much luck. Does anyone have a simple example that I can have? TIA, Jeff From boud at valdyas.org Sat Apr 27 15:21:01 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Problem with Destroy ??? In-Reply-To: <200204252331.14276.tonyc@bellsouth.net> References: <1019555780.1501.15.camel@localhost> <200204252313.04210.boud@valdyas.org> <200204252331.14276.tonyc@bellsouth.net> Message-ID: <200204271519.10530.boud@valdyas.org> On Thursday 25 April 2002 23:31, you wrote: > Hello again... > I don't know if this will help but if I add the destroy signal to the form, > I get a core dump every time the form closes... > Well, I can run the pyuic generated Form1 class without any problems (using RC2). Even running the following doesn't present me with any problems, except for the message Mutex destroy failure: Device or resource busy When the second exec_loop finishes. I can imagine things going wrong; I don't think QApplication is intended to be instantiated more than once from the same application. If you want to run the dialog more than once from the same app, you shouldn't quit the app when the dialog is the only window and it closes. I can easily imagine that QApplication keeps a lot of state, even if the object seems to go out of scope: don't forget the global reference qApp: boud@calcifer:~> python form.py first first second Mutex destroy failure: Device or resource busy second In short: don't try to instantiate QApplication twice. Use one QApplication that opens a dialog more than once. Attached is my version of your script: -- Boudewijn Rempt | http://www.valdyas.org -------------- next part -------------- A non-text attachment was scrubbed... Name: form.py Type: text/x-python Size: 910 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020427/c64b9e98/form.py -------------- next part -------------- A non-text attachment was scrubbed... Name: form1.py Type: text/x-python Size: 1352 bytes Desc: not available Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020427/c64b9e98/form1.py From phil at river-bank.demon.co.uk Sat Apr 27 16:03:00 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] hardcoded :0.0 in creation of QApplication on Xlib...? References: <200204261454.QAA22996@mail.gmd.de> Message-ID: <3CCAAF29.C7E664BC@river-bank.demon.co.uk> Alex Martelli wrote: > > I'm running PyQt apps remotely -- on a Linux machine (Debian if it matters) > to which I'm connecting over the internet via ssh from my own Linux machine > (Mandrake 8.2 if it matters). ssh is channeling X too. And it channels it > OK: environment variable DISPLAY is set to theremotemachine:11.0 and > the whole PyQt apps ARE using that DISPLAY just fine... *except* at the > very moment I create the QApplication object. Then, and only then, I get > two error messages from Xlib: > > Xlib: connection to ":0.0" refused by server > Xlib: Client is not authorized to connect to Server > > I've confirmed that these are indeed emitted exactly when I call > qt.QApplication(sys.argv) . > > I even tried faking up a -display X:Y.0 by appending to sys.argv -- > these error messages still appear, and everything else still seems to > work. PyQt, SIP and Qt all recent versions -- 3.0.3 for Qt in specific. > > Any suggestions for fixes and/or workarounds? I don't understand why > this ":0.0" should apparently be "hard-wired" in Qt's QApplication -- it does > not seem to be doing any real harm (as far as I can tell) but I definitely > wouldn't want to leave this for end-users to see by the time we package > up and start distributing this app's beta, as it looks quite uncool. So, I'll > gladly try whatever kludge you guys can come up with... advthanksance! PyQt doesn't do anything (intentionally) different here - sounds like a Qt issue. Phil From phil at river-bank.demon.co.uk Sat Apr 27 16:05:01 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Post Build Runtime problems libqtcmodule.so: undefined symbol: static_QUType_ptr References: Message-ID: <3CCAAF61.B6E695C0@river-bank.demon.co.uk> Liam Herron wrote: > > I compile the PyQt 3.1 (which takes a long time) when I do a > "make install" it gives me the following error: > > make install-data-hook > make[3]: Entering directory > `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' > (cd /tmp; > PYTHONPATH=/usr/local/lib/python2.2/site-packages:/usr/local/lib/python2.2/site-packages > /usr/local/bin/python -c "import qt") > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/lib/python2.2/site-packages/qt.py", line 47, in ? > import libqtc > ImportError: /usr/local/lib/python2.2/site-packages/libqtcmodule.so: > undefined symbol: static_QUType_ptr > make[3]: *** [install-data-hook] Error 1 > make[3]: Leaving directory > `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' > make[2]: *** [install-data-am] Error 2 > make[2]: Leaving directory > `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' > make[1]: *** [install-am] Error 2 > make[1]: Leaving directory > `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' > make: *** [install-recursive] Error 1 > > This same undefined symbol error happens when I simply run > python and do an "import qt" > > any ideas? Nope. That symbol is not reference explicitly by PyQt. If you want to run PyQt on the Zaurus then I'd recommend the embedded version for which .ipkg binaries are provided. Phil From phil at river-bank.demon.co.uk Sat Apr 27 16:06:01 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] QApplication.notify gets QObject receiver args References: Message-ID: <3CCAAFD9.19714F39@river-bank.demon.co.uk> alh@jenkon.com wrote: > > Howdy, > > I've encountered some mysterious behavior under PyQt. > While watching receiver/event args in a qt.QApplication.notify > override, the first time a window is created/opened, the receiver arg > (for focus events on the new window) is an instance of qt.QLineEdit. > The second time the same type of window is created/opened, the receiver arg > is a qt.QObject instance (instead of the expected qt.QLineEdit). > > Environment is Win2000, Python 2.1.3, Qt 3.0.3, PyQt 3.1. > > For example, run the code below (which opens a window w/ a > "Click" button). > > -- Click the "Click" button, opening a second window with two line-edit controls. > -- Tab twice, alternating focus between the two line-edits; notice that the receiver of the FocusIn > events are instances of qt.QLineEdit. > -- Click the "Click" button, closing the second window. > -- Click the "Click" button to create a new instance of the second window. > -- Tab twice again; notice that this time, the receiver of the FocusIn events are instances of > qt.QObject! This appears to function correctly in 3.2rc4. Phil From phil at thekompany.com Sat Apr 27 16:13:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog NEWS configure configure.ac mkinstalldirs" Message-ID: <20020427141625.DD7773FA9C@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv20399 Modified Files: ChangeLog NEWS configure configure.ac mkinstalldirs Log Message: Fixed a bug in the SIP library Makefile.am. Fixed the bug in the thread support that was causing the problem with the PyQt semaphore.py example. Changed the way %ConvertToSubClassCode worked so it is closer to the old implementation and won't break if it comes across internal classes that it doesn't recognise. From phil at thekompany.com Sat Apr 27 16:13:07 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "sip/sip gencode.c" Message-ID: <20020427141626.42D153FAE0@valentine.thekompany.com> Update of /home/cvs/public/sip/sip In directory valentine:/tmp/cvs-serv20399/sip Modified Files: gencode.c Log Message: Fixed a bug in the SIP library Makefile.am. Fixed the bug in the thread support that was causing the problem with the PyQt semaphore.py example. Changed the way %ConvertToSubClassCode worked so it is closer to the old implementation and won't break if it comes across internal classes that it doesn't recognise. From phil at thekompany.com Sat Apr 27 16:14:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "sip/siplib Makefile.am Makefile.in sip.h siplib.c threads.c" Message-ID: <20020427141626.6D48D3FAE1@valentine.thekompany.com> Update of /home/cvs/public/sip/siplib In directory valentine:/tmp/cvs-serv20399/siplib Modified Files: Makefile.am Makefile.in sip.h siplib.c threads.c Log Message: Fixed a bug in the SIP library Makefile.am. Fixed the bug in the thread support that was causing the problem with the PyQt semaphore.py example. Changed the way %ConvertToSubClassCode worked so it is closer to the old implementation and won't break if it comes across internal classes that it doesn't recognise. From phil at thekompany.com Sat Apr 27 16:16:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog Makefile qevent.sip qlist.sip qobject.sip qobjectlist.sip qptrlist.sip qstyle.sip qtable.sip qwidgetlist.sip" Message-ID: <20020427141922.56DE23FA9B@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv20476 Modified Files: ChangeLog Makefile qevent.sip qlist.sip qobject.sip qobjectlist.sip qptrlist.sip qstyle.sip qtable.sip qwidgetlist.sip Log Message: Removed the bug description at the top of the semaphore.py example now that it is fixed. Changed %ConvertToSubClassCode for QObject to conform to the latest SIP. Replaced calls to sipMapCppToSelf() with sipMapCppToSelfSubClass() where appropriate. From phil at thekompany.com Sat Apr 27 16:16:06 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt/examples3 semaphore.py" Message-ID: <20020427141922.B56243FA9C@valentine.thekompany.com> Update of /home/cvs/public/PyQt/examples3 In directory valentine:/tmp/cvs-serv20476/examples3 Modified Files: semaphore.py Log Message: Removed the bug description at the top of the semaphore.py example now that it is fixed. Changed %ConvertToSubClassCode for QObject to conform to the latest SIP. Replaced calls to sipMapCppToSelf() with sipMapCppToSelfSubClass() where appropriate. From phil at thekompany.com Sat Apr 27 16:16:11 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt/examples semaphore.py" Message-ID: <20020427141922.879713FA56@valentine.thekompany.com> Update of /home/cvs/public/PyQt/examples In directory valentine:/tmp/cvs-serv20476/examples Modified Files: semaphore.py Log Message: Removed the bug description at the top of the semaphore.py example now that it is fixed. Changed %ConvertToSubClassCode for QObject to conform to the latest SIP. Replaced calls to sipMapCppToSelf() with sipMapCppToSelfSubClass() where appropriate. From phil at thekompany.com Sat Apr 27 16:16:16 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt/lib THANKS" Message-ID: <20020427141922.D05823FAA9@valentine.thekompany.com> Update of /home/cvs/public/PyQt/lib In directory valentine:/tmp/cvs-serv20476/lib Modified Files: THANKS Log Message: Removed the bug description at the top of the semaphore.py example now that it is fixed. Changed %ConvertToSubClassCode for QObject to conform to the latest SIP. Replaced calls to sipMapCppToSelf() with sipMapCppToSelfSubClass() where appropriate. From phil at river-bank.demon.co.uk Sat Apr 27 17:12:00 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] ANN: SIP/PyQt v3.2rc4 Message-ID: <3CCABF56.56EAD044@river-bank.demon.co.uk> v3.2rc4 of SIP and PyQt are available at http://www.riverbankcomputing.co.uk/download/snapshots. There are changes that affect all platforms, not just MacOS X. This really, really will be the last release before 3.2 proper. Phil From liam_herron at hotmail.com Sat Apr 27 19:56:00 2002 From: liam_herron at hotmail.com (Liam Herron) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Post Build Runtime problems libqtcmodule.so: undefined symbol: static_QUType_ptr Message-ID: This wasn't a question for zaurus dev. I really just want to learn Qt with Python first on linux and then I will figure it out on the Z. My problem is that I can't even get these things(PyQT, QT) to build correctly. Liam >From: Phil Thompson >To: Liam Herron >CC: pykde@mats.gmd.de >Subject: Re: [PyKDE] Post Build Runtime problems libqtcmodule.so: undefined >symbol: static_QUType_ptr >Date: Sat, 27 Apr 2002 15:02:09 +0100 > >Liam Herron wrote: > > > > I compile the PyQt 3.1 (which takes a long time) when I do a > > "make install" it gives me the following error: > > > > make install-data-hook > > make[3]: Entering directory > > `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' > > (cd /tmp; > > >PYTHONPATH=/usr/local/lib/python2.2/site-packages:/usr/local/lib/python2.2/site-packages > > /usr/local/bin/python -c "import qt") > > Traceback (most recent call last): > > File "", line 1, in ? > > File "/usr/local/lib/python2.2/site-packages/qt.py", line 47, in ? > > import libqtc > > ImportError: /usr/local/lib/python2.2/site-packages/libqtcmodule.so: > > undefined symbol: static_QUType_ptr > > make[3]: *** [install-data-hook] Error 1 > > make[3]: Leaving directory > > `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' > > make[2]: *** [install-data-am] Error 2 > > make[2]: Leaving directory > > `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' > > make[1]: *** [install-am] Error 2 > > make[1]: Leaving directory > > `/home/herronli/ZaurusDev/qt-x11-free-3.0.3/projects/PyQt-3.1/qt' > > make: *** [install-recursive] Error 1 > > > > This same undefined symbol error happens when I simply run > > python and do an "import qt" > > > > any ideas? > >Nope. That symbol is not reference explicitly by PyQt. If you want to >run PyQt on the Zaurus then I'd recommend the embedded version for which >.ipkg binaries are provided. > >Phil _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com From barronsnyder at mac.com Sat Apr 27 21:13:00 2002 From: barronsnyder at mac.com (barronsnyder@mac.com) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] SIP/PyQt v3.2rc4 on OS X In-Reply-To: <3CCABF56.56EAD044@river-bank.demon.co.uk> Message-ID: Hello, I tried to install the latest SIP/PyQt (v3.2rc4). SIP looks good (I think) but I get the following errors with PyQt make: ... cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode /Applications/QtMacEval/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c -o qtcmodule.lo `test -f qtcmodule.cpp || echo './'`qtcmodule.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fno-common -DPIC -o qtcmodule.lo qtcmodule.cpp:168: sipqtQNetworkProtocolFactoryBase.h: No such file or directory In file included from qtcmodule.cpp:169: sipqtQNetworkProtocol.h:46: sipqtQNetworkProtocolFactoryBase.h: No such file or directory make[2]: *** [qtcmodule.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 I went ahead and tried "make install" (with my fingers crossed), but received the following: ... cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode /Applications/QtMacEval/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c -o qtcmodule.lo `test -f qtcmodule.cpp || echo './'`qtcmodule.cpp c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fno-common -DPIC -o qtcmodule.lo qtcmodule.cpp:168: sipqtQNetworkProtocolFactoryBase.h: No such file or directory In file included from qtcmodule.cpp:169: sipqtQNetworkProtocol.h:46: sipqtQNetworkProtocolFactoryBase.h: No such file or directory make[1]: *** [qtcmodule.lo] Error 1 make: *** [install-recursive] Error 1 *sigh* -Barron From phil at river-bank.demon.co.uk Sun Apr 28 12:37:00 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] SIP/PyQt v3.2rc4 on OS X References: Message-ID: <3CCBD046.F636CA88@river-bank.demon.co.uk> barronsnyder@mac.com wrote: > > Hello, > > I tried to install the latest SIP/PyQt (v3.2rc4). SIP looks good (I > think) but I get the following errors with PyQt make: > > ... > cpp-precomp: warning: errors during smart preprocessing, retrying in > basic mode > /Applications/QtMacEval/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h > /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. > -I/sw/include/python2.2 -I/Applications/QtMacEval/include > -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c -o > qtcmodule.lo `test -f qtcmodule.cpp || echo './'`qtcmodule.cpp > c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 > -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT > -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fno-common > -DPIC -o qtcmodule.lo > qtcmodule.cpp:168: sipqtQNetworkProtocolFactoryBase.h: No such file or > directory > In file included from qtcmodule.cpp:169: > sipqtQNetworkProtocol.h:46: sipqtQNetworkProtocolFactoryBase.h: No such > file or directory > make[2]: *** [qtcmodule.lo] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 That .h file is certainly in the tarball in the right directory. Phil From laytonjb at bellsouth.net Sun Apr 28 21:04:00 2002 From: laytonjb at bellsouth.net (Jeff Layton) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Newbie: Problem with QTable Message-ID: <3CCC4794.F32C82BC@bellsouth.net> Hello, I hate to bother everyone, but I'm trying to figure out how to use QTable. I cooked up a small code that doesn't work (natch). I'm attaching the code, but here's the error messages I receive: [laytonj@home2 PYQT]$ /usr/local/python-2.2.1/bin/python table1.py Traceback (most recent call last): File "table1.py", line 17, in ? table=MyTable(numRows, numCols) File "table1.py", line 12, in __init__ self.setCaption("Table1") AttributeError: sipThis I've built and installed python-2.2.1 in /usr/local/python-2.2.1, sip 3.1 in /usr/local/sip-3.1, qt 3.0 in /usr/local/qt, and PyQt-3.1 in /usr/local/PyQt-3.1. Could anybody give a newbie some pointers? TIA, Jeff -------------- next part -------------- import sys from qt import * import qttable numRows=20 numCols=20 class MyTable( qttable.QTable ): def __init__(self, rows, cols): """ help me """ self.setCaption("Table1") app=QApplication(sys.argv) table=MyTable(numRows, numCols) app.setMainWidget(table) table.show() app.exec_loop() From korpios at korpios.com Sun Apr 28 22:02:00 2002 From: korpios at korpios.com (Tom 'Korpios' Tobin) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Qtopia and QMenuBar? Message-ID: <20020428160518.A14458@hecate.korpios.net> Since posting about my problem using Qtopia and QMenuBar together, one other person has mailed me indicating that they were having the same issue. In short, QMenuBar simply does not seem to work under Qtopia and PyQt, either under the Sharp Zaurus or a desktop Qtopia development environment. If someone else actually has QMenuBar working in this setting, would they be so kind as to pass along a short example? Or, if someone else is experiencing the same problem, could they post their experiences to this list as well? Thanks, Tom Tobin korpios@korpios.com From barronsnyder at mac.com Mon Apr 29 00:23:00 2002 From: barronsnyder at mac.com (Barron Snyder) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] SIP/PyQt v3.2rc4 on OS X In-Reply-To: <3CCBD046.F636CA88@river-bank.demon.co.uk> Message-ID: <71630CBF-5AF6-11D6-BC17-003065CC5884@mac.com> You're right, the files are there, but the names have been truncated. I used Stuffit Expander to uncompress SIP and PyQt and apparently it has a 31 character limit on filenames. In PyQt-3.2rc4/qt/, the files show up as: sipqtQNetworkProtocolFactor.1 sipqtQNetworkProtocolFactoryBas And in PyQt-3.2rc4/qtnetwork : sipqtQNetworkProtocolFactoryBas And in PyQt-3.2rc4/qtgl : sipqtQNetworkProtocolFactoryBas And in PyQt-3.2rc4/qtcanvas : sipqtQNetworkProtocolFactoryBas I fixed the filenames and am re-running everything. So far, it looks good. PyQt make is slowly chugging along and seems to be generating the correct files. -Barron On Sunday, April 28, 2002, at 05:34 AM, Phil Thompson wrote: > barronsnyder@mac.com wrote: >> >> Hello, >> >> I tried to install the latest SIP/PyQt (v3.2rc4). SIP looks good (I >> think) but I get the following errors with PyQt make: >> >> ... >> cpp-precomp: warning: errors during smart preprocessing, retrying in >> basic mode >> /Applications/QtMacEval/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h >> /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. >> -I/sw/include/python2.2 -I/Applications/QtMacEval/include >> -DQT_THREAD_SUPPORT -I/usr/X11R6/include -fno-exceptions -O2 -c -o >> qtcmodule.lo `test -f qtcmodule.cpp || echo './'`qtcmodule.cpp >> c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/include/python2.2 >> -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT >> -I/usr/X11R6/include -fno-exceptions -O2 -c qtcmodule.cpp -fno-common >> -DPIC -o qtcmodule.lo >> qtcmodule.cpp:168: sipqtQNetworkProtocolFactoryBase.h: No such file or >> directory >> In file included from qtcmodule.cpp:169: >> sipqtQNetworkProtocol.h:46: sipqtQNetworkProtocolFactoryBase.h: No such >> file or directory >> make[2]: *** [qtcmodule.lo] Error 1 >> make[1]: *** [all-recursive] Error 1 >> make: *** [all] Error 2 > > That .h file is certainly in the tarball in the right directory. > > Phil > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde From barronsnyder at mac.com Mon Apr 29 03:19:00 2002 From: barronsnyder at mac.com (Barron Snyder) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] SIP/PyQt v3.2rc4 on OS X In-Reply-To: <71630CBF-5AF6-11D6-BC17-003065CC5884@mac.com> Message-ID: The files that exceeded the 31 character file limit and were truncated on my machine are listed here along with their corrected file names: PyQt-3.2rc4/qt directory sipqtQNetworkProtocolFactor.1 --> sipqtQNetworkProtocolFactoryBase.h sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.cpp PyQt-3.2rc4/qtcanvas directory sipqtcanvasQCanvasPixmapArray.c --> sipqtcanvasQCanvasPixmapArray.cpp sipqtcanvasQCanvasPolygonal.1 --> sipqtcanvasQCanvasPolygonalItem.h sipqtcanvasQCanvasPolygonalItem --> sipqtcanvasQCanvasPolygonalItem.cpp sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h PyQt-3.2rc4/qtgl directory sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h PyQt-3.2rc4/qtnetwork directory sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h PyQt-3.2rc4/qtpe directory sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h PyQt-3.2rc4/qtsql directory sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h PyQt-3.2rc4/qttable directory sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h PyQt-3.2rc4/qtxml directory sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h sipqtxmlQDomDocumentFragment.cp --> sipqtxmlQDomDocumentFragment.cpp sipqtxmlQDomProcessingInstr.1 --> sipqtxmlQDomProcessingInstruction.h sipqtxmlQDomProcessingInstructi --> sipqtxmlQDomProcessingInstruction.cpp Unfortunately, PyQt make had a few errors even after my corrections: ... ../libtool: parse error: condition expected: xyes = [3183] c++ -dynamiclib -flat_namespace -undefined suppress -o .libs/libqtcanvascmodule-3.2.so qtcanvascmodule.lo sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo -L/usr/X11R6/lib -L/Applications/QtMacEval/lib -L/sw/lib/python2.2/site-packages -L/Applications/PyQt-3.2rc4/qt -L/Applications/PyQt-3.2rc4/qt/.libs -lqtcmodule -lsip -lqt-mt -lSM -lICE -lX11 -lc -install_name /sw/lib/python2.2/site- packages/libqtcanvascmodule-3.2.so /usr/bin/libtool: can't locate file for: -lqtcmodule /usr/bin/libtool: file: -lqtcmodule is not an object file (not allowed in a library) make[2]: *** [libqtcanvascmodule.la] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Any ideas? -Barron From barronsnyder at mac.com Mon Apr 29 03:56:00 2002 From: barronsnyder at mac.com (Barron Snyder) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] SIP/PyQt v3.2rc4 on OS X In-Reply-To: Message-ID: <16DE2351-5B14-11D6-BC17-003065CC5884@mac.com> Well, I went ahead and ran "make install" on PyQt with the following results: ... cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode /Applications/QtMacEval/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h /bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages /bin/sh ../libtool --mode=install /usr/bin/install -c libqtcmodule.la /sw/lib/python2.2/site-packages/libqtcmodule.la /usr/bin/install -c .libs/libqtcmodule-3.2.so /sw/lib/python2.2/site-packages/libqtcmodule-3.2.so (cd /sw/lib/python2.2/site-packages && rm -f libqtcmodule.so && ln -s libqtcmodule-3.2.so libqtcmodule.so) /usr/bin/install -c .libs/libqtcmodule.lai /sw/lib/python2.2/site-packages/libqtcmodule.la ---------------------------------------------------------------------- Libraries have been installed in: /sw/lib/python2.2/site-packages If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable during execution See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages /usr/bin/install -c -m 644 qt.py /sw/lib/python2.2/site-packages/qt.py make install-data-hook (cd /tmp; PYTHONPATH=/sw/lib/python2.2/site- packages:/sw/lib/python2.2/site-packages /sw/bin/python -c "import qt") Traceback (most recent call last): File "", line 1, in ? File "/sw/lib/python2.2/site-packages/qt.py", line 46, in ? import libsip ImportError: Inappropriate file type for dynamic loading make[3]: *** [install-data-hook] Error 1 make[2]: *** [install-data-am] Error 2 make[1]: *** [install-am] Error 2 make: *** [install-recursive] Error 1 I tried to run one of the examples but no go... [localhost:/Applications/PyQt-3.2rc4] barron% cd examples [localhost:/Applications/PyQt-3.2rc4/examples] barron% python addressbook.py Traceback (most recent call last): File "addressbook.py", line 7, in ? from qt import * File "/sw/lib/python2.2/site-packages/qt.py", line 46, in ? import libsip ImportError: Inappropriate file type for dynamic loading Any thoughts? Thanks, Barron On Sunday, April 28, 2002, at 08:17 PM, Barron Snyder wrote: > The files that exceeded the 31 character file limit and were truncated > on my machine are listed here along with their corrected file names: > > PyQt-3.2rc4/qt directory > sipqtQNetworkProtocolFactor.1 --> sipqtQNetworkProtocolFactoryBase.h > sipqtQNetworkProtocolFactoryBas --> > sipqtQNetworkProtocolFactoryBase.cpp > > PyQt-3.2rc4/qtcanvas directory > sipqtcanvasQCanvasPixmapArray.c --> sipqtcanvasQCanvasPixmapArray.cpp > sipqtcanvasQCanvasPolygonal.1 --> sipqtcanvasQCanvasPolygonalItem.h > sipqtcanvasQCanvasPolygonalItem --> > sipqtcanvasQCanvasPolygonalItem.cpp > sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h > > PyQt-3.2rc4/qtgl directory > sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h > > PyQt-3.2rc4/qtnetwork directory > sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h > > PyQt-3.2rc4/qtpe directory > sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h > > PyQt-3.2rc4/qtsql directory > sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h > > PyQt-3.2rc4/qttable directory > sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h > > PyQt-3.2rc4/qtxml directory > sipqtQNetworkProtocolFactoryBas --> sipqtQNetworkProtocolFactoryBase.h > sipqtxmlQDomDocumentFragment.cp --> sipqtxmlQDomDocumentFragment.cpp > sipqtxmlQDomProcessingInstr.1 --> > sipqtxmlQDomProcessingInstruction.h > sipqtxmlQDomProcessingInstructi --> > sipqtxmlQDomProcessingInstruction.cpp > > > Unfortunately, PyQt make had a few errors even after my corrections: > > ... > ../libtool: parse error: condition expected: xyes = [3183] > c++ -dynamiclib -flat_namespace -undefined suppress -o > .libs/libqtcanvascmodule-3.2.so qtcanvascmodule.lo > sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo > sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo > sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo > sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo > sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo > sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo > sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo > -L/usr/X11R6/lib -L/Applications/QtMacEval/lib > -L/sw/lib/python2.2/site-packages -L/Applications/PyQt-3.2rc4/qt > -L/Applications/PyQt-3.2rc4/qt/.libs -lqtcmodule -lsip -lqt-mt -lSM > -lICE -lX11 -lc -install_name /sw/lib/python2.2/site- > packages/libqtcanvascmodule-3.2.so > /usr/bin/libtool: can't locate file for: -lqtcmodule > /usr/bin/libtool: file: -lqtcmodule is not an object file (not allowed > in a library) > make[2]: *** [libqtcanvascmodule.la] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > > Any ideas? > > -Barron > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde From humbert at hagen.de Mon Apr 29 07:51:00 2002 From: humbert at hagen.de (Ludger Humbert) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] SIP/PyQt v3.2rc4 on OS X References: <16DE2351-5B14-11D6-BC17-003065CC5884@mac.com> Message-ID: <3CCCDEA1.7000705@hagen.de> Barron Snyder wrote: > Well, I went ahead and ran "make install" on PyQt with the following > results: > ... > ImportError: Inappropriate file type for dynamic loading -----------> > make[3]: *** [install-data-hook] Error 1 > make[2]: *** [install-data-am] Error 2 > make[1]: *** [install-am] Error 2 > make: *** [install-recursive] Error 1 > > > I tried to run one of the examples but no go... > > [localhost:/Applications/PyQt-3.2rc4] barron% cd examples > [localhost:/Applications/PyQt-3.2rc4/examples] barron% python > addressbook.py > Traceback (most recent call last): > File "addressbook.py", line 7, in ? > from qt import * > File "/sw/lib/python2.2/site-packages/qt.py", line 46, in ? > import libsip > ImportError: Inappropriate file type for dynamic loading -----------> The problem remains -- I you look at ...python-2.2/site-packages/ you'll find some libs With file ... you can detect the type of a file If you look at libsip* you'll find, that there is *no* bundle file. So, you have to fiddle with the generated "libtool" -- file as Dimitri described in http://mats.gmd.de/pipermail/pykde/2002-April/002594.html in B) The main element for producing bundle libs: for sip and for PyQt on the Mac OS X: Look for \\"x ... \\ and change it to \"x ... \ After this, you have to make ; make install I the meantime, I rejected rc4 and did it all with rc2 on the Mac and .. it works -- not perfect, e.g. QToolButton() does not work. Ludger From phil at thekompany.com Mon Apr 29 12:13:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog configure configure.ac mkinstalldirs" Message-ID: <20020429101630.787B63FA37@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv24049 Modified Files: ChangeLog configure configure.ac mkinstalldirs Log Message: configure doesn't search for X11 for Qt/E. Fixed the bug where the class object for namespaces was being incorrectly exported. From phil at thekompany.com Mon Apr 29 12:13:14 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "sip/sip gencode.c" Message-ID: <20020429101630.BDD6F3FA55@valentine.thekompany.com> Update of /home/cvs/public/sip/sip In directory valentine:/tmp/cvs-serv24049/sip Modified Files: gencode.c Log Message: configure doesn't search for X11 for Qt/E. Fixed the bug where the class object for namespaces was being incorrectly exported. From phil at thekompany.com Mon Apr 29 12:14:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt qpemenubar.sip qpetoolbar.sip ChangeLog Makefile qpeapplication.sip qtdocs.sip-in qtpemod.sip-in" Message-ID: <20020429101747.DFAB33FA55@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv24101 Modified Files: ChangeLog Makefile qpeapplication.sip qtdocs.sip-in qtpemod.sip-in Added Files: qpemenubar.sip qpetoolbar.sip Log Message: configure doesn't search for X11 for Qt/E. Added the QPEMenuBar and QPEToolBar classes. From phil at thekompany.com Mon Apr 29 12:15:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt/lib acinclude.m4" Message-ID: <20020429101747.066FF3FA22@valentine.thekompany.com> Update of /home/cvs/public/PyQt/lib In directory valentine:/tmp/cvs-serv24101/lib Modified Files: acinclude.m4 Log Message: configure doesn't search for X11 for Qt/E. Added the QPEMenuBar and QPEToolBar classes. From phil at river-bank.demon.co.uk Mon Apr 29 12:17:00 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Qtopia and QMenuBar? References: <20020428160518.A14458@hecate.korpios.net> Message-ID: <3CCD1D32.462604D8@river-bank.demon.co.uk> Tom 'Korpios' Tobin wrote: > > Since posting about my problem using Qtopia and QMenuBar together, one other person has mailed me indicating that they were having the same issue. > > In short, QMenuBar simply does not seem to work under Qtopia and PyQt, either under the Sharp Zaurus or a desktop Qtopia development environment. > > If someone else actually has QMenuBar working in this setting, would they be so kind as to pass along a short example? > > Or, if someone else is experiencing the same problem, could they post their experiences to this list as well? Note that Qtopia includes QPEMenuBar and QPEToolBar which should be used instead of QMenuBar and QToolBar. These will appear in PyQt v3.2. Phil From adalke at mindspring.com Mon Apr 29 14:12:00 2002 From: adalke at mindspring.com (Andrew Dalke) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] bug in QListView{Item} height? Message-ID: <07ed01c1ef76$f8817e60$0201a8c0@josiah.dalkescientific.com> I'm using 3.0.3 and most recent PyQt and Python. If I insert a pixmap in a QListView with a hierarchical view, and the size of the pixmap is higher than the normal size of the row, then the branch decorations are askew. I can reproduce the problem by implementing a QListViewItem and defining my own height()/setup()/setHeight() methods. I've appended a reproducible to this email. Once open, toggle the [+/-] box and see the ugliness. Note also that the line doesn't go up to the text like I would have expected it to do. I suspect it's a Qt bug and not PyQt bug, but I don't know how to use the C++ interface so hope that someone here can verify it for me before I report it to trolltech. Andrew dalke@dalkescientific.com from qt import * import sys a = QApplication(sys.argv) w = QListView() w.setRootIsDecorated(1) w.addColumn("ABC") w.addColumn("DEF") pix = QPixmap(100, 100) ## Uncomment the next line and there are no problems #pix = QPixmap(10, 10) parent1 = QListViewItem(w) parent1.setText(0, "Parent1") parent1.setPixmap(1, pix) child11 = QListViewItem(parent1) child11.setText(0, "Child11") child11.setText(1, "blah") parent2 = QListViewItem(w, parent1) parent2.setText(0, "Second parent") parent2.setText(1, "spam") child21 = QListViewItem(parent2, "col1", "col2") child22 = QListViewItem(parent2, child21, "last", "the end") w.setCaption("Blah, blah") a.setMainWidget(w) w.show() a.exec_loop() From phil at thekompany.com Mon Apr 29 20:06:01 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "sip/sip gencode.c" Message-ID: <20020429180917.297AC3FA16@valentine.thekompany.com> Update of /home/cvs/public/sip/sip In directory valentine:/tmp/cvs-serv32011/sip Modified Files: gencode.c Log Message: Fixed a bug where sub-class convertors were being generated for imported classes. From phil at thekompany.com Mon Apr 29 20:07:47 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog" Message-ID: <20020429180916.05BF03FA1A@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv32011 Modified Files: ChangeLog Log Message: Fixed a bug where sub-class convertors were being generated for imported classes. From phil at thekompany.com Mon Apr 29 20:10:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt/lib README.Linux Makefile.am" Message-ID: <20020429181005.296E23FA16@valentine.thekompany.com> Update of /home/cvs/public/PyQt/lib In directory valentine:/tmp/cvs-serv32037/lib Modified Files: Makefile.am Added Files: README.Linux Log Message: Added README.Linux describing the broken Qt packages in Mandrake and Debian. From phil at thekompany.com Mon Apr 29 20:11:26 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog build.sh qtmod.sip-in" Message-ID: <20020429181005.0E2043FA1A@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv32037 Modified Files: ChangeLog build.sh qtmod.sip-in Log Message: Added README.Linux describing the broken Qt packages in Mandrake and Debian. From chugadie.geo at yahoo.com Mon Apr 29 20:34:01 2002 From: chugadie.geo at yahoo.com (M K) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] PyQt-3.1 undefined symbol: metaObject__ Message-ID: <20020429183346.39782.qmail@web14203.mail.yahoo.com> Hi guys, having a little trouble installing PyQt-3.1 on mdk-8.2 I installed Qt-3 from rpm (with the devel package), built sip and PyQt-3.1 myself. When I run make install on pyqt i get the following error (cd /tmp; PYTHONPATH=/usr/lib/python2.2/site-packages:/usr/lib/python2.2/site-packages /usr/bin/python -c "import qt") Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/site-packages/qt.py", line 47, in ? import libqtc ImportError: /usr/lib/python2.2/site-packages/libqtcmodule.so: undefined symbol: metaObject__C9QSGIStyle I've rebuilt pyqt about 4 times over the weekend and solved incremental problems relating to pyqt-mt.so.2 being on the system, but that is not the case now. I've checked all the relevant objects and executables, including, but not limited to: /usr/lib/qt3/bin/moc /usr/lib/python2.2/site-packages/libqtcmodule.so /usr/lib/python2.2/site-packages/libsip.so.8 and none of them are linked to qt2. I'm assuming this has something to do with moc and the SGI theme. I can't tell much more than that. I can't find any reference to 'qt2' in the entire source for PyQt-3.1 nor sip-3.1. T.I.A. __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com From brk at jenkon.com Mon Apr 29 20:48:00 2002 From: brk at jenkon.com (brk@jenkon.com) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] 3.2rc4 instability Message-ID: <61AC3AD3E884D411836F0050BA8FE9F3903635@franklin.jenkon.com> After upgrading from 3.1 to 3.2rc4 (Windows NT 4.0, sp6a, python 2.1.3, Qt 3.0.3), I'm seeing a lot of new crashes on calls to simple methods like centralWidget() and parent(). Here's a simple example which crashes. Is anyone else having this sort of trouble? Thanks, Bryn --- import sys import qt class MainWin(qt.QMainWindow): def __init__(self): qt.QMainWindow.__init__(self) self.wnd = None btn = qt.QPushButton('Click', self) btn.resize(btn.sizeHint()) self.connect(btn, qt.SIGNAL('clicked()'), self.toggleWindow) def toggleWindow(self): self.centralWidget() #self.parent() if __name__ == '__main__': app = qt.QApplication(sys.argv) win = MainWin() win.show() app.connect(app, qt.SIGNAL('lastWindowClosed()'), app, qt.SLOT('quit()')) app.exec_loop() Bryn Keller Senior Software Engineer Jenkon brk@jenkon.com From phil at river-bank.demon.co.uk Mon Apr 29 20:51:00 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] PyQt-3.1 undefined symbol: metaObject__ References: <20020429183346.39782.qmail@web14203.mail.yahoo.com> Message-ID: <3CCD952E.348C77C@river-bank.demon.co.uk> M K wrote: > > Hi guys, having a little trouble installing PyQt-3.1 > on mdk-8.2 > > I installed Qt-3 from rpm (with the devel package), > built sip and PyQt-3.1 myself. When I run make > install on pyqt i get the following error > > (cd /tmp; > PYTHONPATH=/usr/lib/python2.2/site-packages:/usr/lib/python2.2/site-packages > /usr/bin/python -c "import qt") > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/lib/python2.2/site-packages/qt.py", line > 47, in ? > import libqtc > ImportError: > /usr/lib/python2.2/site-packages/libqtcmodule.so: > undefined symbol: metaObject__C9QSGIStyle > > I've rebuilt pyqt about 4 times over the weekend and > solved incremental problems relating to pyqt-mt.so.2 > being on the system, but that is not the case now. > I've checked all the relevant objects and executables, > including, but not limited to: > > /usr/lib/qt3/bin/moc > /usr/lib/python2.2/site-packages/libqtcmodule.so > /usr/lib/python2.2/site-packages/libsip.so.8 > > and none of them are linked to qt2. I'm assuming this > has something to do with moc and the SGI theme. I > can't tell much more than that. I can't find any > reference to 'qt2' in the entire source for PyQt-3.1 > nor sip-3.1. See attached. Phil -------------- next part -------------- This file describes some things to be aware of when building PyQt under Linux. Broken Mandrake and Debian Qt Installations Both Mandrake and Debian omit some of the style classes, particularly QSGIStyle, QCDEStyle, QWindowsStyle and QMotifStyle, but don't make the corresponding changes to the file $QTDIR/include/qconfig.h. If you get unresolved symbols relating to any of these classes when building PyQt then trying adding one or more of the following lines to $QTDIR/include/qconfig.h and then re-building PyQt. #define QT_NO_STYLE_CDE #define QT_NO_STYLE_MOTIF #define QT_NO_STYLE_SGI #define QT_NO_STYLE_WINDOWS Thanks to John R Marshall and James Lamanna. Phil Thompson phil@riverbankcomputing.co.uk From barronsnyder at mac.com Mon Apr 29 21:06:00 2002 From: barronsnyder at mac.com (Barron Snyder) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] SIP/PyQt v3.2rc4 on OS X In-Reply-To: <3CCCDEA1.7000705@hagen.de> Message-ID: <4E4117EA-5BA3-11D6-98BD-003065CC5884@mac.com> Okay, I tried it again with v3.2rc4 following Ludger's advice and Dimitri's libtool directions. Things *seem* to be getting closer to a clean install but when I run the examples at the command line, the system goes away for a long while (and I get my hopes up) but then comes back with a bus error. I've included my "make install" and my try at running dclock.py just in case they are of use to anyone . -Barron PyQt's make install: [localhost:/Applications/pyqt-3.2rc4] barron% sudo make install Password: Making install in features ./sip_helper >../sipQtFeatures.h make[2]: Nothing to be done for `install-exec-am'. make[2]: Nothing to be done for `install-data-am'. Making install in qt c++ -E -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -I.. sipqtProxyqt.h >moc_sipqtProxyqt.h sipqtProxyqt.h:39: undefined type, found `class' sipqtProxyqt.h:39: illegal external declaration, missing `;' after `sipProxyqt' sipqtProxyqt.h:39: undefined type, found `public' sipqtProxyqt.h:39: illegal external declaration, missing `;' after `sipProxy' sipqtProxyqt.h:41: undefined type, found `Q_OBJECT' sipqtProxyqt.h:43: illegal external declaration, missing `;' after `public' sipqtProxyqt.h:46: undefined type, found `public' sipqtProxyqt.h:46: illegal external declaration, missing `;' after `slots' sipqtProxyqt.h:48: undefined type, found `QAction' sipqtProxyqt.h:50: syntax error, found `&' sipqtProxyqt.h:50: illegal function definition, found `)' sipqtProxyqt.h:51: syntax error, found `&' sipqtProxyqt.h:51: illegal function definition, found `)' sipqtProxyqt.h:52: syntax error, found `&' sipqtProxyqt.h:52: illegal function definition, found `)' sipqtProxyqt.h:54: syntax error, found `&' sipqtProxyqt.h:54: illegal function definition, found `)' sipqtProxyqt.h:58: undefined type, found `QIconViewItem' sipqtProxyqt.h:58: syntax error, found `&' sipqtProxyqt.h:58: illegal function definition, found `)' sipqtProxyqt.h:61: undefined type, found `QDropEvent' sipqtProxyqt.h:61: syntax error, found `&' sipqtProxyqt.h:61: illegal function definition, found `)' sipqtProxyqt.h:64: undefined type, found `QIconViewItem' sipqtProxyqt.h:64: syntax error, found `&' sipqtProxyqt.h:64: illegal function definition, found `)' sipqtProxyqt.h:67: undefined type, found `QIconViewItem' sipqtProxyqt.h:67: syntax error, found `&' sipqtProxyqt.h:67: illegal function definition, found `)' sipqtProxyqt.h:70: undefined type, found `QIconViewItem' sipqtProxyqt.h:72: undefined type, found `QListBoxItem' sipqtProxyqt.h:72: syntax error, found `&' sipqtProxyqt.h:72: illegal function definition, found `)' sipqtProxyqt.h:73: undefined type, found `QListBoxItem' sipqtProxyqt.h:73: syntax error, found `&' sipqtProxyqt.h:73: illegal function definition, found `)' sipqtProxyqt.h:74: undefined type, found `QListBoxItem' sipqtProxyqt.h:75: undefined type, found `QListViewItem' sipqtProxyqt.h:76: undefined type, found `QListViewItem' sipqtProxyqt.h:76: syntax error, found `&' sipqtProxyqt.h:76: illegal function definition, found `)' sipqtProxyqt.h:77: undefined type, found `QDropEvent' sipqtProxyqt.h:78: undefined type, found `QListViewItem' sipqtProxyqt.h:78: syntax error, found `&' sipqtProxyqt.h:78: illegal function definition, found `)' sipqtProxyqt.h:79: undefined type, found `QListViewItem' sipqtProxyqt.h:79: syntax error, found `&' sipqtProxyqt.h:79: illegal function definition, found `)' sipqtProxyqt.h:80: undefined type, found `QListViewItem' sipqtProxyqt.h:81: undefined type, found `QDockWindow' sipqtProxyqt.h:82: syntax error, found `&' sipqtProxyqt.h:82: illegal function definition, found `)' sipqtProxyqt.h:83: syntax error, found `&' sipqtProxyqt.h:83: illegal function definition, found `)' sipqtProxyqt.h:84: undefined type, found `QTextCursor' sipqtProxyqt.h:85: syntax error, found `::' sipqtProxyqt.h:85: illegal function definition, found `)' sipqtProxyqt.h:86: syntax error, found `&' sipqtProxyqt.h:86: illegal function definition, found `)' sipqtProxyqt.h:87: syntax error, found `&' sipqtProxyqt.h:87: illegal function definition, found `)' sipqtProxyqt.h:89: syntax error, found `::' sipqtProxyqt.h:89: illegal function definition, found `)' sipqtProxyqt.h:90: syntax error, found `::' sipqtProxyqt.h:90: illegal function definition, found `)' sipqtProxyqt.h:93: syntax error, found `&' sipqtProxyqt.h:93: illegal function definition, found `)' sipqtProxyqt.h:96: syntax error, found `&' sipqtProxyqt.h:96: illegal function definition, found `)' sipqtProxyqt.h:99: undefined type, found `QNetworkOperation' sipqtProxyqt.h:102: syntax error, found `&' sipqtProxyqt.h:102: illegal function definition, found `)' sipqtProxyqt.h:105: syntax error, found `&' sipqtProxyqt.h:105: illegal function definition, found `)' sipqtProxyqt.h:108: undefined type, found `QNetworkOperation' sipqtProxyqt.h:111: syntax error, found `&' sipqtProxyqt.h:111: illegal function definition, found `)' sipqtProxyqt.h:114: syntax error, found `&' sipqtProxyqt.h:114: illegal function definition, found `)' sipqtProxyqt.h:115: undefined type, found `QWidget' sipqtProxyqt.h:116: undefined type, found `QObject' cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode /Applications/QtMacEval/bin/moc -o sipqtProxyqt.moc moc_sipqtProxyqt.h /bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages /bin/sh ../libtool --mode=install /usr/bin/install -c libqtcmodule.la /sw/lib/python2.2/site-packages/libqtcmodule.la /usr/bin/install -c .libs/libqtcmodule-3.2.so /sw/lib/python2.2/site-packages/libqtcmodule-3.2.so (cd /sw/lib/python2.2/site-packages && rm -f libqtcmodule.so && ln -s libqtcmodule-3.2.so libqtcmodule.so) /usr/bin/install -c .libs/libqtcmodule.lai /sw/lib/python2.2/site-packages/libqtcmodule.la ---------------------------------------------------------------------- Libraries have been installed in: /sw/lib/python2.2/site-packages If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable during execution See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages /usr/bin/install -c -m 644 qt.py /sw/lib/python2.2/site-packages/qt.py make install-data-hook (cd /tmp; PYTHONPATH=/sw/lib/python2.2/site- packages:/sw/lib/python2.2/site-packages /sw/bin/python -c "import qt") Making install in qtcanvas c++ -E -I/sw/include/python2.2 -I/Applications/QtMacEval/include -DQT_THREAD_SUPPORT -I/usr/X11R6/include -I.. sipqtcanvasProxyqtcanvas.h >moc_sipqtcanvasProxyqtcanvas.h sipqtcanvasProxyqtcanvas.h:39: undefined type, found `class' sipqtcanvasProxyqtcanvas.h:39: illegal external declaration, missing `;' after `sipProxyqtcanvas' sipqtcanvasProxyqtcanvas.h:39: undefined type, found `public' sipqtcanvasProxyqtcanvas.h:39: illegal external declaration, missing `;' after `sipProxy' sipqtcanvasProxyqtcanvas.h:41: undefined type, found `Q_OBJECT' sipqtcanvasProxyqtcanvas.h:43: illegal external declaration, missing `;' after `public' sipqtcanvasProxyqtcanvas.h:46: undefined type, found `public' sipqtcanvasProxyqtcanvas.h:46: illegal external declaration, missing `;' after `slots' sipqtcanvasProxyqtcanvas.h:48: undefined type, found `QObject' cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode /Applications/QtMacEval/bin/moc -o sipqtcanvasProxyqtcanvas.moc moc_sipqtcanvasProxyqtcanvas.h /bin/sh ../libtool --mode=link c++ -fno-exceptions -O2 -o libqtcanvascmodule.la -rpath /sw/lib/python2.2/site-packages -module -release 3.2 qtcanvascmodule.lo sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo -L../qt -lqtcmodule -L/sw/lib/python2.2/site-packages -L/Applications/QtMacEval/lib -lsip -lqt-mt -L/usr/X11R6/lib -lSM -lICE -lX11 rm -fr .libs/libqtcanvascmodule.la .libs/libqtcanvascmodule.* .libs/libqtcanvascmodule-3.2.* *** Warning: This library needs some functionality provided by -lqtcmodule. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: libtool could not satisfy all declared inter-library *** dependencies of module libqtcanvascmodule. Therefore, libtool will create *** a static module, that should work as long as the dlopening *** application is linked with the -dlopen flag. ar cru .libs/libqtcanvascmodule.a qtcanvascmodule.lo sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo ranlib .libs/libqtcanvascmodule.a creating libqtcanvascmodule.la (cd .libs && rm -f libqtcanvascmodule.la && ln -s ../libqtcanvascmodule.la libqtcanvascmodule.la) /Applications/pyqt-3.2rc4/qtcanvas/.libs /bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages /bin/sh ../libtool --mode=install /usr/bin/install -c libqtcanvascmodule.la /sw/lib/python2.2/site- packages/libqtcanvascmodule.la libtool: install: warning: relinking `libqtcanvascmodule.la' cd /Applications/pyqt-3.2rc4/qtcanvas; /bin/sh ../libtool --mode=relink c++ -fno-exceptions -O2 -o libqtcanvascmodule.la -rpath /sw/lib/python2.2/site-packages -module -release 3.2 qtcanvascmodule.lo sipqtcanvasQCanvasText.lo sipqtcanvasQCanvasEllipse.lo sipqtcanvasQCanvasLine.lo sipqtcanvasQCanvasSpline.lo sipqtcanvasQCanvasPolygon.lo sipqtcanvasQCanvasRectangle.lo sipqtcanvasQCanvasPolygonalItem.lo sipqtcanvasQCanvasSprite.lo sipqtcanvasQCanvasPixmapArray.lo sipqtcanvasQCanvasPixmap.lo sipqtcanvasQCanvasView.lo sipqtcanvasQCanvas.lo sipqtcanvasQCanvasItem.lo sipqtcanvasQCanvasItemList.lo -L../qt -lqtcmodule -L/sw/lib/python2.2/site-packages -L/Applications/QtMacEval/lib -lsip -lqt-mt -L/usr/X11R6/lib -lSM -lICE -lX11 /Applications/pyqt-3.2rc4/qtcanvas/.libs mv: rename libqtcanvascmodule-3.2.so to libqtcanvascmodule-3.2.soU: No such file or directory libtool: install: error: relink `libqtcanvascmodule.la' with the above command before installing it ---------------------------------------------------------------------- Libraries have been installed in: /sw/lib/python2.2/site-packages If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable during execution See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /bin/sh ../mkinstalldirs /sw/lib/python2.2/site-packages /usr/bin/install -c -m 644 qtcanvas.py /sw/lib/python2.2/site- packages/qtcanvas.py make install-data-hook (cd /tmp; PYTHONPATH=/sw/lib/python2.2/site- packages:/sw/lib/python2.2/site-packages /sw/bin/python -c "import qtcanvas") Traceback (most recent call last): File "", line 1, in ? File "/sw/lib/python2.2/site-packages/qtcanvas.py", line 41, in ? import libqtcanvasc ImportError: No module named libqtcanvasc make[3]: *** [install-data-hook] Error 1 make[2]: *** [install-data-am] Error 2 make[1]: *** [install-am] Error 2 make: *** [install-recursive] Error 1 And then I tried to run one of the examples but still no go... [localhost:/Applications/pyqt-3.2rc4] barron% cd examples [localhost:/Applications/pyqt-3.2rc4/examples] barron% python dclock.py Bus error [localhost:/Applications/pyqt-3.2rc4/examples] barron% On Monday, April 29, 2002, at 12:48 AM, Ludger Humbert wrote: > Barron Snyder wrote: > >> Well, I went ahead and ran "make install" on PyQt with the following >> results: >> > > ... > > >> ImportError: Inappropriate file type for dynamic loading > > -----------> > >> make[3]: *** [install-data-hook] Error 1 >> make[2]: *** [install-data-am] Error 2 >> make[1]: *** [install-am] Error 2 >> make: *** [install-recursive] Error 1 >> I tried to run one of the examples but no go... >> [localhost:/Applications/PyQt-3.2rc4] barron% cd examples >> [localhost:/Applications/PyQt-3.2rc4/examples] barron% python >> addressbook.py >> Traceback (most recent call last): >> File "addressbook.py", line 7, in ? >> from qt import * >> File "/sw/lib/python2.2/site-packages/qt.py", line 46, in ? >> import libsip >> ImportError: Inappropriate file type for dynamic loading > -----------> > > > The problem remains -- I you look at > ...python-2.2/site-packages/ > you'll find some libs > With > file ... > you can detect the type of a file > > If you look at > libsip* > you'll find, that there is *no* bundle file. > > > So, you have to fiddle with > the generated "libtool" -- file as > Dimitri > described in > http://mats.gmd.de/pipermail/pykde/2002-April/002594.html > in B) > > The main element for producing bundle libs: > for sip and for PyQt on the Mac OS X: > Look for > \\"x ... \\ > and change it to > \"x ... \ > After this, you have to > make ; make install > > I the meantime, I rejected rc4 and did it all with rc2 on the Mac > and .. it works -- not perfect, e.g. > QToolButton() does not work. > > > Ludger > > > > > _______________________________________________ > PyKDE mailing list PyKDE@mats.gmd.de > http://mats.gmd.de/mailman/listinfo/pykde From phil at river-bank.demon.co.uk Tue Apr 30 09:48:01 2002 From: phil at river-bank.demon.co.uk (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] 3.2rc4 instability References: <61AC3AD3E884D411836F0050BA8FE9F3903635@franklin.jenkon.com> Message-ID: <3CCE4BCF.F227B284@river-bank.demon.co.uk> brk@jenkon.com wrote: > > After upgrading from 3.1 to 3.2rc4 (Windows NT 4.0, sp6a, python 2.1.3, Qt > 3.0.3), I'm seeing a lot of new crashes on calls to simple methods like > centralWidget() and parent(). Here's a simple example which crashes. Is > anyone else having this sort of trouble? One one Windows specific change that was made was to use the -MD rather than the -MT compiler flag so that it matches the default used to build Python and Qt. If you are building with different defaults, that might make a difference. Phil From phil at thekompany.com Tue Apr 30 09:50:00 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt ChangeLog Makefile build.sh qscrollbar.sip qstyle.sip qtdocs.sip-in versions.sip" Message-ID: <20020430075236.3B8333FAC1@valentine.thekompany.com> Update of /home/cvs/public/PyQt In directory valentine:/tmp/cvs-serv14656 Modified Files: ChangeLog Makefile build.sh qscrollbar.sip qstyle.sip qtdocs.sip-in versions.sip Log Message: configure will now search fro Qt v3.0.4. Changes required fro Qt v3.0.4. Another minor bug fix related to X11 support and Qt/E. From phil at thekompany.com Tue Apr 30 09:51:21 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt/lib acinclude.m4" Message-ID: <20020430075236.5886C3FAA5@valentine.thekompany.com> Update of /home/cvs/public/PyQt/lib In directory valentine:/tmp/cvs-serv14656/lib Modified Files: acinclude.m4 Log Message: configure will now search fro Qt v3.0.4. Changes required fro Qt v3.0.4. Another minor bug fix related to X11 support and Qt/E. From phil at thekompany.com Tue Apr 30 09:52:42 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "PyQt/pyuic3 embed.cpp main.cpp" Message-ID: <20020430075236.986E63FAC5@valentine.thekompany.com> Update of /home/cvs/public/PyQt/pyuic3 In directory valentine:/tmp/cvs-serv14656/pyuic3 Modified Files: embed.cpp main.cpp Log Message: configure will now search fro Qt v3.0.4. Changes required fro Qt v3.0.4. Another minor bug fix related to X11 support and Qt/E. From phil at thekompany.com Tue Apr 30 09:55:01 2002 From: phil at thekompany.com (Phil Thompson) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] [cvs commit] "sip ChangeLog configure configure.ac mkinstalldirs" Message-ID: <20020430075459.346933FAC1@valentine.thekompany.com> Update of /home/cvs/public/sip In directory valentine:/tmp/cvs-serv14721 Modified Files: ChangeLog configure configure.ac mkinstalldirs Log Message: configure will now search for Qt v3.0.4. From aleax at aleax.it Tue Apr 30 16:29:01 2002 From: aleax at aleax.it (Alex Martelli) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Fwd: Re: 3.0.3 XLib QApplication uses hardcoded :0.0 ... ? Message-ID: <200204301428.QAA31850@mail.gmd.de> Just for completeness about my reported bug: ... > Xlib: connection to ":0.0" refused by server > Xlib: Client is not authorized to connect to Server I also sent it to trolltech and just received a response from Bradley Hughes: """ > the application does run afterwards, but the error message is always > there. Looks like a (minor) Qt bug to me (or could it be XFree86? seems > unlikely but...). This is actually a bug in the DRI libraries included with XFree86 4. DRI is only enabled for local connections, so the DRI driver tries to connect to :0.0 instead of the display being used. I've seen this message many many times, but unfortunately there isn't a way to get rid of it. """ So, it's official -- it's an XFree86 buglet, related to Direct Rendering, and presumably without any other ill-effect. http://dri.sourceforge.net/ is the home of DRI, by the way, in case you're curious about what it is. Sorry to have wasted time and attention of people on this list, but at least now should some customer complain about such messages when your PyQt application starts up, you know the answer:-). Alex From brk at jenkon.com Tue Apr 30 21:04:00 2002 From: brk at jenkon.com (brk@jenkon.com) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] 3.2rc4 instability Message-ID: <61AC3AD3E884D411836F0050BA8FE9F390363E@franklin.jenkon.com> Changing this flag didn't change the behavior for me. I thought it might be a linking problem, because sip 3.2 produces sip.lib/dll, while 3.1 produced libsip.lib/dll - but the makefiles for pyqt 3.2 are still looking for libsip.lib, not sip.lib! So I changed the siplib makefile to produce libsip.lib instead, but that didn't fix the problem either. > -----Original Message----- > From: Phil Thompson [SMTP:phil@river-bank.demon.co.uk] > Sent: Tuesday, April 30, 2002 12:46 AM > To: brk@jenkon.com > Cc: pykde@mats.gmd.de > Subject: Re: [PyKDE] 3.2rc4 instability > > brk@jenkon.com wrote: > > > > After upgrading from 3.1 to 3.2rc4 (Windows NT 4.0, sp6a, python 2.1.3, > Qt > > 3.0.3), I'm seeing a lot of new crashes on calls to simple methods like > > centralWidget() and parent(). Here's a simple example which crashes. Is > > anyone else having this sort of trouble? > > One one Windows specific change that was made was to use the -MD rather > than the -MT compiler flag so that it matches the default used to build > Python and Qt. If you are building with different defaults, that might > make a difference. > > Phil From boud at valdyas.org Tue Apr 30 22:59:00 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Adding things to Qt classes Message-ID: <200204302257.27434.boud@valdyas.org> One of the things I like to do is stuff extra data in QApplication, like this: Python 2.2.1 (#1, Apr 12 2002, 22:26:33) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import qt, sys >>> qapp = qt.QApplication(sys.argv) >>> qapp.field = "bla" >>> qapp.field 'bla' >>> I've finally found some time for experimenting with QTable, and I wanted to associate data with QTableItems without going to the length of subclassing them, and without keeping a dictionary mapping items to data. So I did the following: ... for f in rec: if f[0].inList: c += 1 self.setText(r, c, f[1]) self.item.field = f ... And that doesn't work, because you can create classes with read-only attributes nowadays: Traceback (most recent call last): File "kuragui/guitable.py", line 85, in ? main(sys.argv) File "kuragui/guitable.py", line 77, in main mainwin.refresh(app.createObject('lng_lex', form="adan")) File "kuragui/guitable.py", line 54, in refresh self.item.field = f TypeError: 'builtin_function_or_method' object has only read-only attributes (assign to .field) Is this behavious intentional? Necessary? Or would it be just as easy to simply allow it? -- Boudewijn Rempt | http://www.valdyas.org From boud at valdyas.org Tue Apr 30 23:24:00 2002 From: boud at valdyas.org (Boudewijn Rempt) Date: Thu Mar 8 10:26:36 2007 Subject: [PyKDE] Adding things to Qt classes In-Reply-To: <200204302257.27434.boud@valdyas.org> References: <200204302257.27434.boud@valdyas.org> Message-ID: <200204302322.23885.boud@valdyas.org> On Tuesday 30 April 2002 22:57, Boudewijn Rempt wrote: > self.item.field = f I must have been sleeping not to catch this typo: self.item().field = f It works after all -- I can add things to the object, but not to the class. Right, back to my regularly scheduled drowsing.