Re: [PyQt] Learning path
Am Friday, 9. January 2009 schrieb Steven Woody: I want to use PyQt but I don't get experience with Qt itself. What's the best learning path to me? Any suggestion will be highly appreciated! From my own experience: Just go ahead with PyQt, no need to have a profound experience of C++ or Qt, though the latter will help of course. You might though need C++ and (C++) Qt to prove bugs in PyQt, as reports like X doesn't work with PyQt most likely only get feedback if it includes but does in Qt. Just my humble opinion, Christoph ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Problem with apps build with Py2exe
Some MS Windows users have problem running PyQt4 applications - exe/binary builds made with Py2exe. The problem is that Windows displays a message like this (translation from Polish) This application can't be run as it configuration is wrong. Problem may be solved by reinstalling the script. It works for some users, and for some don't (plus it's no install run.exe made from run.py). Any ideas why Windows makes such problems? :) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with apps build with Py2exe
On ven, 2009-01-09 at 10:07 +0100, piotr maliński wrote: Some MS Windows users have problem running PyQt4 applications - exe/binary builds made with Py2exe. The problem is that Windows displays a message like this (translation from Polish) This application can't be run as it configuration is wrong. Problem may be solved by reinstalling the script. It works for some users, and for some don't (plus it's no install run.exe made from run.py). Any ideas why Windows makes such problems? :) Are you using Python 2.6? -- Giovanni Bajo Develer S.r.l. http://www.develer.com ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with apps build with Py2exe
Yes, Python, 2.6 and latest PyQt4 build for windows/Py2.6 2009/1/9 Giovanni Bajo ra...@develer.com On ven, 2009-01-09 at 10:07 +0100, piotr maliński wrote: Some MS Windows users have problem running PyQt4 applications - exe/binary builds made with Py2exe. The problem is that Windows displays a message like this (translation from Polish) This application can't be run as it configuration is wrong. Problem may be solved by reinstalling the script. It works for some users, and for some don't (plus it's no install run.exe made from run.py). Any ideas why Windows makes such problems? :) Are you using Python 2.6? -- Giovanni Bajo Develer S.r.l. http://www.develer.com ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with apps build with Py2exe
Hi, That problem appeared on my software. The best choice is to use version 2.5. PyQt4 for Python 2.6 compiled code requires MSCV to work. Bye! 2009/1/9 piotr maliński riklau...@gmail.com: Yes, Python, 2.6 and latest PyQt4 build for windows/Py2.6 2009/1/9 Giovanni Bajo ra...@develer.com On ven, 2009-01-09 at 10:07 +0100, piotr maliński wrote: Some MS Windows users have problem running PyQt4 applications - exe/binary builds made with Py2exe. The problem is that Windows displays a message like this (translation from Polish) This application can't be run as it configuration is wrong. Problem may be solved by reinstalling the script. It works for some users, and for some don't (plus it's no install run.exe made from run.py). Any ideas why Windows makes such problems? :) Are you using Python 2.6? -- Giovanni Bajo Develer S.r.l. http://www.develer.com ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Learning path
On 2009-01-09, Steven Woody wrote: Hi, I want to use PyQt but I don't get experience with Qt itself. What's the best learning path to me? Any suggestion will be highly appreciated! Well obviously the first step is to buy my book:-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Rapid GUI Programming with Python and Qt - ISBN 0132354187' ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] QPainter bug(?) in printing.pyw example from PyQt book
On 2009-01-08, Denis Konchekov wrote: System: Ubuntu 8.10, Python 2.5.2, PyQt 4.4.3 Book Rapid GUI Programming with Python and Qt, example from chap13 Faded cells in first table after printing to pdf (before changing pen color). See screenshot in attachment or here: http://img404.imageshack.us/done.php?l=img404/1899/75073848lv9.jpg Everything ok after adding yet another painter.setPen(Qt.color): ... y += serifLineHeight if balance 0: painter.setPen(Qt.red) text = Please remit the amount owing immediately. else: text = (We are delighted to have done business with you.) painter.drawText(x, y, text) painter.setPen(Qt.red) #added painter.setPen(Qt.black) y += int(serifLineHeight * 1.5) painter.drawText(x, y, Transactions:) y += serifLineHeight option = QTextOption(Qt.AlignRight|Qt.AlignVCenter) for date, amount in statement.transactions: ... mysticism? Hi Denis, I get exactly the same problem as you do with Qt 4.4, so it looks to me like a Qt (or PyQt) bug that was not present in Qt 4.3. My preferred workaround is: painter.setPen(Qt.NoPen)# workaround painter.setPen(Qt.black) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Programming in Python 3 - ISBN 0137129297 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Learning path
Actually, Mark, I agree whole heartedly with you. I bought the rough cuts and started with that and then got the book. I think it is an extremely well written book for guiding someone through learning pyQt. Thank you for writing it. Doug On Fri, Jan 9, 2009 at 5:38 AM, Mark Summerfield m...@qtrac.eu wrote: On 2009-01-09, Steven Woody wrote: Hi, I want to use PyQt but I don't get experience with Qt itself. What's the best learning path to me? Any suggestion will be highly appreciated! Well obviously the first step is to buy my book:-) -- Mark Summerfield, Qtrac Ltd, www.qtrac.eu C++, Python, Qt, PyQt - training and consultancy Rapid GUI Programming with Python and Qt - ISBN 0132354187' ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Doug Nichols dou...@gmail.com http://dnwnichols.home.comcast.net/ ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Learning path
On Fri Jan 9 08:12:28 GMT 2009, Christoph Burgmer chrislb at gmx.de wrote: Am Friday, 9. January 2009 schrieb Steven Woody: I want to use PyQt but I don't get experience with Qt itself. What's the best learning path to me? Any suggestion will be highly appreciated! From my own experience: Just go ahead with PyQt, no need to have a profound experience of C++ or Qt, though the latter will help of course. You might though need C++ and (C++) Qt to prove bugs in PyQt, as reports like X doesn't work with PyQt most likely only get feedback if it includes but does in Qt. Or the other way round when trying to prove the bug is present in Qt. ;-) There are people on this list (and on qt-interest) who can help you rewrite simple PyQt examples in C++, so it helps to simplify code that shows problems as well as you can before reporting bugs. David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with apps build with Py2exe
A Divendres 09 Gener 2009, Sergio Jovani va escriure: Hi, That problem appeared on my software. The best choice is to use version 2.5. PyQt4 for Python 2.6 compiled code requires MSCV to work. Well, shouldn't py2exe include all required libraries? I'm having the same problem here, I'll investigate some more this weekend, but if the problem is some missing libraries there should be a way of including them in the dist directory... Bye! 2009/1/9 piotr maliński riklau...@gmail.com: Yes, Python, 2.6 and latest PyQt4 build for windows/Py2.6 2009/1/9 Giovanni Bajo ra...@develer.com On ven, 2009-01-09 at 10:07 +0100, piotr maliński wrote: Some MS Windows users have problem running PyQt4 applications - exe/binary builds made with Py2exe. The problem is that Windows displays a message like this (translation from Polish) This application can't be run as it configuration is wrong. Problem may be solved by reinstalling the script. It works for some users, and for some don't (plus it's no install run.exe made from run.py). Any ideas why Windows makes such problems? :) Are you using Python 2.6? -- Giovanni Bajo Develer S.r.l. http://www.develer.com ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Albert Cervera i Areny http://www.NaN-tic.com ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Re: Problem with apps build with Py2exe
* piotr mali?ski (Fri, 9 Jan 2009 10:07:00 +0100) Some MS Windows users have problem running PyQt4 applications - exe/binary builds made with Py2exe. The problem is that Windows displays a message like this (translation from Polish) This application can't be run as it configuration is wrong. Problem may be solved by reinstalling the script. It works for some users, and for some don't (plus it's no install run.exe made from run.py). Any ideas why Windows makes such problems? :) Try pyinstaller - it works like a charm... Thorsten ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with apps build with Py2exe
Installing this: http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BFdisplaylang=en makes the apps running :) but it apply only for some windows users. 2009/1/9 Albert Cervera i Areny alb...@nan-tic.com A Divendres 09 Gener 2009, Sergio Jovani va escriure: Hi, That problem appeared on my software. The best choice is to use version 2.5. PyQt4 for Python 2.6 compiled code requires MSCV to work. Well, shouldn't py2exe include all required libraries? I'm having the same problem here, I'll investigate some more this weekend, but if the problem is some missing libraries there should be a way of including them in the dist directory... Bye! 2009/1/9 piotr maliński riklau...@gmail.com: Yes, Python, 2.6 and latest PyQt4 build for windows/Py2.6 2009/1/9 Giovanni Bajo ra...@develer.com On ven, 2009-01-09 at 10:07 +0100, piotr maliński wrote: Some MS Windows users have problem running PyQt4 applications - exe/binary builds made with Py2exe. The problem is that Windows displays a message like this (translation from Polish) This application can't be run as it configuration is wrong. Problem may be solved by reinstalling the script. It works for some users, and for some don't (plus it's no install run.exe made from run.py). Any ideas why Windows makes such problems? :) Are you using Python 2.6? -- Giovanni Bajo Develer S.r.l. http://www.develer.com ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt -- Albert Cervera i Areny http://www.NaN-tic.com ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Learning path
I would start with whatever you have the most experience with and jump off from there. Without knowing what languages you're used to, it's hard to say. But if you're strong in Python then transitioning to PyQt is the easiest route. If you're stronger in C++ then maybe starting out with C++ is the quickest. Either way you'll need a little understanding of the structure of C++ to be able to read some of the examples and threads discussing Qt. Also, having experience with some type of gui toolkit helps. You didn't mention whether you had ever worked with one before. But if you already understand the concepts of layouts and such, then it's just a matter of learning new functionality and syntax. My background was in Python with Tkinter, so jumping into PyQt wasn't that difficult. Fortunately I'm C++ literate as well, so that opens up more help when it comes to online examples. However there's still a bit of a learning curve when trying to figure out all the data containers and views for trees/tables/etc. Other than that it's fairly straight forward. If you're completely new to gui design then start with the most basic tutorials and work your way through them to learn the concepts. If you've got some experience then the best way is to just start working through examples. I use Eric IDE with QtDesigner. When I've been stuck on the syntax of something I can just place it on the palette, generate the .py code and see what it looks like. That's worked really well for me. On Fri, Jan 9, 2009 at 1:35 AM, Steven Woody narkewo...@gmail.com wrote: Hi, I want to use PyQt but I don't get experience with Qt itself. What's the best learning path to me? Any suggestion will be highly appreciated! - narke ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with apps build with Py2exe
Hello, Well, shouldn't py2exe include all required libraries? I'm having the same problem here, I'll investigate some more this weekend, but if the problem is some missing libraries there should be a way of including them in the dist Not necessarily. For example, it will not automatically include the QtSvg4 library because (in my installation anyways) this is considered a system library. You can force this by overriding py2exe's isSystemDll and creating a list of dll's you want to include automatically in your setup.py script. I use the following code below.When py2exe is checking which dll's should be included, it first asks if they are system dll's; if so, they will not be included (since a system dll should be on the system by default?). My guess is that it needs to be forced to include msvcp90.dll or something. If it is a dll like the MS VC Runtime DLL then that needs to be included along side your exe (not packaged within it or it's library). I would say in your setup.py script to manually copy it to your dist folder. Darryl -- Example (originally from http://eli.thegreenplace.net/2008/10/09/packaging-dlls-with-executable-made-by-py2exe/): - # Override the function in py2exe to determine if a dll should be included. dllList = ('yourLibraryName.dll') origIsSystemDLL = py2exe.build_exe.isSystemDLL def isSystemDLL(pathname): if os.path.basename(pathname).lower() in dllList: return 0 return origIsSystemDLL(pathname) py2exe.build_exe.isSystemDLL = isSystemDLL - ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] KHTMLPart mouse events
Jim, Simon, I hope you can help me. I am trying to track a user's MidButton mouse click to track paste actions. It seems that khtmlMousePressEvent (khtml::MousePressEvent* event) is the right place to do that, but the sip-file does not have those mouse event methods, they are commented out. Can that be changed in a later version? Is there a reason for them not being activated? The KHTMLPart itself does the MidButton action in these methods[1]. Christoph [1] http://api.kde.org/4.x-api/kdelibs-apidocs/khtml/html/khtml__part_8cpp- source.html#l06061 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] ANN: Pylons plugin released
Hi, the first snapshot of the new Pylons plugin has been released. It adds the Pylons project type, API files for the various Pylons modules and various templates code. You may get it via the eric4 plugin repository dialog or the eric4 web site. If there is enough demand, it will be expanded to offer support like the Django plugin. Regards, Detlev -- Detlev Offenbach det...@die-offenbachs.de ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] KHTMLPart mouse events
On Friday 09 January 2009 08:50:07 am Christoph Burgmer wrote: Jim, Simon, I hope you can help me. I am trying to track a user's MidButton mouse click to track paste actions. It seems that khtmlMousePressEvent (khtml::MousePressEvent* event) is the right place to do that, but the sip-file does not have those mouse event methods, they are commented out. Can that be changed in a later version? Is there a reason for them not being activated? The KHTMLPart itself does the MidButton action in these methods[1]. I suspect that khtml::MousePressEvent is not a class that's exposed in the public KDE API - meaning it's declared in some file that PyKDE doesn't wrap. So if you got one, you couldn't do anything with it anyway, since it's not a wrapped class. However, there are mouse events (QMouseEvent) available in KHTMLView, and you can get the KHTMLView object from the part by calling it's view() method. Don't know if those will do what you want, but it seems like they should. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QVariant.toPyObject semantics
Hi all, I've a question about QVariant toPyObject method. I want to store a dict in a QVariant (i hate QVariant, but i need them for QSettings and Qt.UserData in QListWidget...) i try to make an interface for converting all the python types in qt types and store the qt types in QVariants but it doesn't work on linux (on mac os x it works fine). I decide to try the toPyObject method. On linux, when i store a dict in a QVariant and i call the toPyObject method it returns exactly the python types found in the stored dict. In mac os x, with the same dict, when i try to retrieve it with the toPyObject method it returns a dict with all the python strs (or unicodes) converted in QStrings and it converts when it can, all the python types in qt types. Why the same method has a different behaviour on Linux and Mac OS X? Linux: PyQt 4.4.3 Qt 4.4.1 python 2.5.2 Mac OS X: PyQt 4.4.4 - Qt 4.4.3 python 2.5.1 Help are greatly appreciated :D ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Re: Learning path
Doug Nichols doug16 at gmail.com writes: Actually, Mark, I agree whole heartedly with you. I bought the rough cuts and started with that and then got the book. I think it is an extremely well written book for guiding someone through learning pyQt. Thank you for writing it.Doug i second that. thanks and congratulations to mark. the only thing i wasn't quite used to at the beginning is for each example (there are like real world programs, at least in my eyes, that users probably will find already useful, especially after some tweaking) the code is broken into pieces/segments for explanation and at the end there isn't one complete sample (i guess to save pages). but once downloaded the source code, this problem is gone. again, great book. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt