[PyQt] Can no longer copy QColor objects
Problem: Can no longer copy QColor objects Occured with PYQT 3.17.2 and SIP 4.6 Can anybody kindly confirm whether this problem has vanished (or not?) with the latest SIP version (4.7)? Thanks, Matti Input: import qt import sip from copy import copy print PYQT version, qt.PYQT_VERSION_STR print SIP version, sip.SIP_VERSION_STR, sip.SIP_VERSION c = qt.QColor() print __reduce__ , c.__reduce__ print __reduce_ex__, c. __reduce_ex__ copy(c) Output: 2.4.3 (#1, Mar 29 2007, 10:11:04) [GCC 4.1.0 (SUSE Linux)] PYQT version 3.17.2 SIP version 4.6 263680 __reduce__ None __reduce_ex__ None Traceback (most recent call last): File qtbug1.py, line 11, in ? copy(c) File /usr/local/encap/python-2.4//lib/python2.4/copy.py, line 106, in copy raise Error(un(shallow)copyable object of type %s % cls) copy.Error: un(shallow)copyable object of type class 'qt.QColor' If you are not the intended addressee, please inform us immediately that you have received this e-mail by mistake and delete it. We thank you for your support. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Can no longer copy QColor objects
On Tuesday 07 August 2007 8:00 am, [EMAIL PROTECTED] wrote: Problem: Can no longer copy QColor objects Occured with PYQT 3.17.2 and SIP 4.6 Was there a time when you *could* copy QColor objects? Can anybody kindly confirm whether this problem has vanished (or not?) with the latest SIP version (4.7)? Output with current snapshots... PYQT version 3-snapshot-20070613 SIP version 4.7-snapshot-20070804 263936 __reduce__ built-in method __reduce__ of QColor object at 0x2b4d84fcdc88 __reduce_ex__ built-in method __reduce_ex__ of QColor object at 0x2b4d84fcdc88 Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] ANN: PyQwt3D-0.1.5 released
What is PyQwt3D ( http://pyqwt3d.sourceforge.net) ? - it is a set of Python bindings for the QwtPlot3D C++ class library which extends the Qt framework with widgets for 3D data visualization. PyQwt3D inherits the snappy feel from QwtPlot3D. The examples at http://pyqwt.sourceforge.net/pyqwt3d-examples.html show how easy it is to make a 3D plot and how to save a 3D plot to an image or an (E)PS/PDF/PGF/SVG file. - it requires and extends PyQt, a set of Python bindings for Qt. - it supports the use of PyQt, Qt, QwtPlot3D, and NumPy or SciPy in a GUI Python application or in an interactive Python session. - it runs on POSIX, Mac OS X and Windows platforms (practically any platform supported by Qt and Python). The home page of PyQwt3D is http://pyqwt.sourceforge.net. New features and bugfixes in PyQwt3D-0.1.5: - Added support for QwtPlot3D-0.2.7 - Added support for SIP-4.7, PyQt-4.3 and PyQt-3.17.3. - Added support for SVG and PGF vector output. - Added Qwt3D.save() to facilitate saving plots to a file. - Added Qwt3D.plot() to facilitate function plotting with nicely scaled axes. - Fixed the type of the result of IO.outputHandler(format). - Fixed saving to pixmap formats in qt4examples/Grab.py. PyQwt3D-0.1.5 supports: 1. Python-2.5, or -2.4. 2. PyQt-4.3, -4.2, -4.1, or -3.17. 3. SIP-4.7, -4.6, or -4.5. 4. Qt-4.3, -4.2, Qt-3.3, or -3.2. 5. QwtPlot3D-0.2.7. Enjoy -- Gerard Vermeulen ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] QSizeGrip does not work
On 8/7/2007 12:24 PM, Giovanni Bajo wrote: Hi Phil, it looks like QSizeGrip does not work at all in Windows. Something really simple like: from PyQt4.Qt import * app = QApplication([]) mw = QMainWindow() QSizeGrip(mw) mw.show() can be used to verify that it does not work. I debugged it a little and found out that QSizeEvent::winEvent() (the C++ function) is never invoked. The equivalent C++ code works perfectly (and QSizeEvent::winEvent() is invoked for every event, like expected). Typo: I meant QSizeGrip::winEvent. -- Giovanni Bajo ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QSizeGrip does not work
Hi Phil, it looks like QSizeGrip does not work at all in Windows. Something really simple like: from PyQt4.Qt import * app = QApplication([]) mw = QMainWindow() QSizeGrip(mw) mw.show() can be used to verify that it does not work. I debugged it a little and found out that QSizeEvent::winEvent() (the C++ function) is never invoked. The equivalent C++ code works perfectly (and QSizeEvent::winEvent() is invoked for every event, like expected). Any idea what's going on? -- Giovanni Bajo ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] QSizeGrip does not work
On Tuesday 07 August 2007 11:30 am, Giovanni Bajo wrote: On 8/7/2007 12:24 PM, Giovanni Bajo wrote: Hi Phil, it looks like QSizeGrip does not work at all in Windows. Something really simple like: from PyQt4.Qt import * app = QApplication([]) mw = QMainWindow() QSizeGrip(mw) mw.show() can be used to verify that it does not work. I debugged it a little and found out that QSizeEvent::winEvent() (the C++ function) is never invoked. The equivalent C++ code works perfectly (and QSizeEvent::winEvent() is invoked for every event, like expected). Typo: I meant QSizeGrip::winEvent. If you add... %If (WS_WIN) bool winEvent(MSG *message, long *result); %End ...to the protected section of QSizeGrip in qsizegrip.sip then it should work. QWizard has the same problem. They'll be fixed in tonight's snapshot. Thanks, Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Qt 4.3.1
Hello, Qt 4.3.1 has been released; is PyQt 4.3 compatible? Thanks, Charles. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Qt 4.3.1
On Tue Aug 7 14:50:41 BST 2007, charles chen wrote: Qt 4.3.1 has been released; is PyQt 4.3 compatible? It works fine for me. David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Qt 4.3.1
On Tuesday 07 August 2007 2:50 pm, charles chen wrote: Hello, Qt 4.3.1 has been released; is PyQt 4.3 compatible? Yes. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] opengl/overpainting example failing on glPushAttrib
I have been trying to get the overpainting and 2dpainting examples in PyQt (examples/openg/) to work on Linux. I am running Ubuntu 7.04 with the latest nvidia drivers. At first I kept getting segfaults with these examples and their cpp counterparts in the Qt 4.3 examples. After a few hours of searching I found that other people solved this by installing the nvidia driver manually (directly from nvidia). This fixed the seg faults and made it so the cpp versions in Qt 4.3 examples work flawlessly, but I still have a problem with the overpainting example in python (2dpainting works fine). When I run overpainting I get the following output: python overpainting.py Traceback (most recent call last): File overpainting.py, line 177, in paintEvent glPushAttrib(GL_ALL_ATTRIB_BITS) OpenGL.GL.GLerror: [Errno 1281] invalid value QPaintEngine::setSystemRect: Should not be changed while engine is active QPaintEngine::setSystemClip: Should not be changed while engine is active QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent QPaintEngine::setSystemClip: Should not be changed while engine is active QPaintEngine::setSystemRect: Should not be changed while engine is active QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent QPaintEngine::setSystemClip: Should not be changed while engine is active QPaintEngine::setSystemRect: Should not be changed while engine is active QPaintEngine::setSystemRect: Should not be changed while engine is active QPaintEngine::setSystemClip: Should not be changed while engine is active QPaintEngine::setSystemRect: Should not be changed while engine is active QPaintEngine::setSystemClip: Should not be changed while engine is active QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent QPaintEngine::setSystemClip: Should not be changed while engine is active QPaintEngine::setSystemRect: Should not be changed while engine is active QWidget::repaint: It is dangerous to leave painters active on a widget outside of the PaintEvent QPaintEngine::setSystemClip: Should not be changed while engine is active QPaintEngine::setSystemRect: Should not be changed while engine is active QPaintEngine::setSystemRect: Should not be changed while engine is active QPaintEngine::setSystemClip: Should not be changed while engine is active Traceback (most recent call last): File overpainting.py, line 177, in paintEvent glPushAttrib(GL_ALL_ATTRIB_BITS) OpenGL.GL.GLerror: [Errno 1281] invalid value When I comment out all the code in paintEvent that deals with the painter (ie. the first 3 lines and the last 5 lines), then the application runs without errors but never displays anything. (I am guessing that a swap buffers call is missing somewhere) Can anyone else confirm that this application works for them or does anyone have any ideas why it may be failing for me? Thanks, Allen ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Set a SVG image as background and with transparency
On Mon, 6 Aug 2007 11:17:18 -0300, Gustavo A. Díaz wrote: I tried to render a svg file and load as background, which i didn't succeed... i just threated it as a pixmaps to load it, but with that i cant set transparency ,if i am not wrong. Pixmaps can have levels of transparency, too. For example, i have a label which is the same size of my application and is where i put the image as background having this result: http://opencoffee.lnxteam.org/downloads/pub/pics/OpenCoffee_Server.png (is the mainWidget background, the bluish one) So, do you want just the blue areas to be partially transparent? I'm not sure how to do that. Now, i want to know how to load that image but rendering as a SVG file should be threated in that background. What i temporary did is: self.mainWindowPixmap = QtGui.QPixmap ( :/Pixmaps/pixmaps/oc_mainWindowBg.svg) self.mainWindowBg.setPixmap(self.mainWindowPixmap) (mainWindowBg is the QLabel) Which i know is not the correct way to threat a SVG image. OK, but it's still worth testing with a pixmap - as you have done. I have two doubts here, one is i want to set transparency a SVG image, render and set it in that QLabel The other, is how do i set transparency for the window of that app using that SVG image? (which should have transparency if i am not wrong) The transparency set using QWidget.setWindowOpacity() is for everything in the window, which isn't what you want. It might be worth checking that this works, anyway, because what you want to do will depend on system features that this also needs. PS: i know David, i read those links about transparency... but i have those doubts and i have no clear how to render a svg file and load/set inside a QLabel I would suggest using a QSvgWidget instead of a QLabel for displaying SVG drawings that you want to be scalable. David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] PyKDE4 progress report
As of a few minutes ago, I have a working PyKDE4 version for KDE 4 beta 1 (3.92.0). Working in the sense that all the modules will load and I can run a simple app that puts up a window. If anyone is interested in playing with it (it's still very rough) drop me an email directly ([EMAIL PROTECTED] - put PyKDE in the title so I don't think it's spam), and indicate either a) which classes you're going to write example programs for or b) which classes you're going to write test code for. Absent either (a) or (b), requests are likely to be ignored. If you're not sure, I'll be happy to suggest something. Future requests for pre-release tarballs, features, or assistance will depend on whether I've received promised example or test code. Sorry to be a hardass, but one of the biggest problems with PyKDE3 was that it had insufficient example code and even less test code so that even as of a few days ago people are still discovering significant parts of PyKDE3 that just don't work. I hope to avoid that situation in the future. I plan to do considerably more of that kind of thing, but with something like 600 classes and 10,000 methods and over 1 million lines of C++ code - those are PyKDE3's stats - it's difficult to cover even the high spots, especially given the fact that I don't know what a lot of PyKDE even does. Simon Edwards (whose still on holiday, I think) will eventually be incorporating PyKDE4 into the KDE SVN (under kdebindings), so it should be available in some form in one of the later betas or early release candidates. This won't be available for download otherwise until the initial official release (except as noted above), after which I'll provide tarballs as in the past. Well ... hopefully in a more timely fashion than in the past. At any rate, if things work according to plan, Simon will be able to issue new releases with new KDE versions as well. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt