[PyQt] can't compile pykde (kdebindings)
I'm trying to build a kdebindings package for UHU-Linux, but i can't. It was ok with previous stable releases of sip and pyqt4. python 2.6.2 qt 4.5.2 sip 4.9 pyqt4 4.6 kdebindings 4.3.0 /var/uhubuild/work/compile/python/pykde4/sip/kdecore/klocalizedstring.sip: In function 'QString klocalizedstring_i18n_template(KLocalizedString, PyObject*, int*)': /var/uhubuild/work/compile/python/pykde4/sip/kdecore/klocalizedstring.sip:92: error: 'sipClass_QString' was not declared in this scope /var/uhubuild/work/compile/python/pykde4/sip/kdecore/typedefs.sip: In function 'int convertTo_QPair_0100QString_0100QString(PyObject*, void**, int*, PyObject*)': /var/uhubuild/work/compile/python/pykde4/sip/kdecore/typedefs.sip:682: error: 'sipClass_QString' was not declared in this scope /var/uhubuild/work/compile/python/pykde4/sip/kdecore/typedefs.sip: In function 'PyObject* convertFrom_QPair_0100QString_0100QString(void*, PyObject*)': /var/uhubuild/work/compile/python/pykde4/sip/kdecore/typedefs.sip:650: error: 'sipClass_QString' was not declared in this scope make[2]: *** [python/pykde4/CMakeFiles/python_module_PyKDE4_kdecore.dir/sip/kdecore/sipkdecorepart0.o] Error 1 make[1]: *** [python/pykde4/CMakeFiles/python_module_PyKDE4_kdecore.dir/all] Error 2 make: *** [all] Error 2 Regards btami ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Regarding code completion in pydev
Hi, I am using eclipse + pydev. The code completion on modules classes methods works but the argument list is always empty. Does any body have idea why it is so? Thanks, ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Form/dialog without title bar and actions buttons
Hi, I'm a newbee in Qt/PyQt but I'm starting to use it. The first problem that I need to solve is how to remove the title bar from a Dialog/MainWindow? I use Qt Designer to make the form. Thank you. P.S.- Using Fedora Linux 11 KDE ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] ANN: PyQt v4.6 and SIP v4.9 Released
Phil Thompson wrote: PyQt v4.6 and SIP v4.9 have been released and are available from the usual places. This more or less completes the development identified in the (now discarded) roadmap. In particular it means that QString and QVariant can be made to disappear completely. This is the default if you are using Python v3. Python v2 retains the old behaviour (for obvious compatibility reasons) but you can select the new behaviour using the new sip.setapi() call. All the examples will still run under Python v2 and v3. See the respective NEWS files for the details. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt Hi Phil, Standard report ... ;-( more precisely: linux mandriva cooker distrib after upgrading and eric4 launch : [se...@dualstar]$ eric4 Traceback (most recent call last): File /usr/lib/python2.6/site-packages/eric4/eric4.py, line 47, in module from KdeQt.KQApplication import KQApplication File /usr/lib/python2.6/site-packages/eric4/KdeQt/__init__.py, line 20, in module import Preferences File /usr/lib/python2.6/site-packages/eric4/Preferences/__init__.py, line 26, in module from PyQt4 import Qsci RuntimeError: the sip module implements API v6.0 but the PyQt4.Qsci module requires API v5.0 Best regards, Serge. -- We all know Linux is great...it does infinite loops in 5 seconds. Linus Torvalds -- Serge Montagnac http://www.obs-psr.com obs-...@orange.fr -- ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Snow Leopard
hi pyqt, I had some problems forcing Apples Python to 32 bit. neither export VERSIONER_PYTHON_PREFER_32_BIT=yes nor defaults write com.apple.versioner.python Prefer-32-Bit -bool yes was working. compiling sip4.9 and PyQt4.6 for Qt4.5.2 worked fine, but importing failed: python -c from PyQt4 import QtCore Traceback (most recent call last): File string, line 1, in module ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtCore.so, 2): no suitable image found. Did find: /Library/Python/2.6/site-packages/PyQt4/QtCore.so: mach-o, but wrong architecture only arch -i386 python -c from PyQt4 import QtCore worked. unfortunately I could not force Eclipse/PyDev to run Python in 32bit and therefore auto-completion of PyQt is not working. is there anything I can do to improve this situation? best regards michael PS: for some strange reasons Python 2.6.2 from Python.org crashes with Eclipse3.5/PyDev1.5 (both 32 bit carbon and 64 bit cocoa versions) ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Mac OS X Problem: PyQT applications not focusing on launch
Am 25.09.2009 um 18:24 schrieb Alexei Puzikov: hello = HelloWorld() hello.show() hello.raise_() # this will raise the window on Mac OS X sys.exit(app.exec_()) This was a mighty useful advice. The internet doesn't seem to be aware of this solution (as mentioned, I only found the clue to pack things together via py2app). Is there a possibility to make this more prominent in the docs or add a page with Mac OS X notes to some wiki? Cheers, Holger Given it's a Mac-only problem, which wasn't reproducible with Qt, only PyQt, for me it looks like a PyQt bug. But the fix is quite easy. A. On Fri, Sep 25, 2009 at 5:16 PM, Holger Rapp r...@mrt.uka.de wrote: Hi, Every pyqt example I start under Mac OS X (PyQt 4.5.4, Python 2.6 from Python.org, Mac OS X 10.5.8), no matter which (I tried the delivered examples in the source distribution and also the examples from the python book [1], I also tried the eric IDE and spyder) fail to receive the focus when launched. A click is needed to raise the application. Sometimes the newly opened window is hidden under others. I am aware that I have to use pythonw (instead of python) for GUI scripts, but this doesn't change anything. After googling I read that I just have to bundle my scripts in .app packages because the issues is all Apples fault. I feel this is unelegant and most importantly: all wxpython applications RECEIVE the focus when launched (no matter if with python or pythonw), therefore there IS a way to make scripts open up GUI applications with focus. I give code examples for pyqt (no focus) and WXPython (receives focus) below my message. Maybe someone with more insight can shed some light on this problem. [1] http://www.qtrac.eu/pyqtbook.tar.gz Greetings, Holger --- SNIP --- # encoding: utf-8 # wxPython example. This receives focus on launch. # Launch with # $ python hello_world_wx.py # File: hello_world_wx.py import wx app = wx.PySimpleApp() frame = wx.Frame(None, wx.ID_ANY, Hello World) frame.Show(True) app.MainLoop() --- SNAP --- --- SNIP --- # encoding: utf-8 # pyqt example. This DOES NOT receives focus on launch. # Launch with # $ python hello_world_qt.py # or # $ pythonw hello_world_qt.py # Doesn't make a difference on my computer. # File: hello_world_qt.py from PyQt4 import QtCore, QtGui import sys class HelloWorld(QtGui.QWidget): def __init__(self, parent=None): super(HelloWorld, self).__init__(parent) self.setWindowTitle(Hello World) app = QtGui.QApplication(sys.argv) hello = HelloWorld() hello.show() sys.exit(app.exec_()) --- SNAP --- ___ 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] Mac OS X Problem: PyQT applications not focusing on launch
On Mon Sep 28 11:37:27 BST 2009, Holger Rapp wrote: Am 25.09.2009 um 18:24 schrieb Alexei Puzikov: hello = HelloWorld() hello.show() hello.raise_() # this will raise the window on Mac OS X sys.exit(app.exec_()) This was a mighty useful advice. The internet doesn't seem to be aware of this solution (as mentioned, I only found the clue to pack things together via py2app). Is there a possibility to make this more prominent in the docs or add a page with Mac OS X notes to some wiki? Maybe somewhere in the PyQt Wiki: http://www.diotavelli.net/PyQtWiki/StartPage Perhaps create a Platform Specific Notes page and add a link to it in the list under Developing with PyQt and PyKDE on the main page. David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] slots don't get called
On Tuesday 22 September 2009 01:40:42 pm Peter Bienstman wrote: On Tuesday 22 September 2009 01:26:50 pm you wrote: Which system is this? Mine is WinXP with PyQt-Py2.6-gpl-4.5.4-1.exe . Linux using current snapshots. A problem like that is unlikely to be platform dependent. Is there a Windows installer for the latest snapshot by any chance? Perhaps the problem is already solved there. I tried 4.6, but no luck... I've stripped down my test case to a single 50-line self-contained file: http://users.ugent.be/~pbienst/pub/no_slot.py If there is anything more I can do to help you debug this, don't hesitate to ask. Thanks for looking into this! Peter ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] slots don't get called
On Mon, 28 Sep 2009 14:15:34 +0200, Peter Bienstman peter.bienst...@ugent.be wrote: On Tuesday 22 September 2009 01:40:42 pm Peter Bienstman wrote: On Tuesday 22 September 2009 01:26:50 pm you wrote: Which system is this? Mine is WinXP with PyQt-Py2.6-gpl-4.5.4-1.exe . Linux using current snapshots. A problem like that is unlikely to be platform dependent. Is there a Windows installer for the latest snapshot by any chance? Perhaps the problem is already solved there. I tried 4.6, but no luck... I've stripped down my test case to a single 50-line self-contained file: http://users.ugent.be/~pbienst/pub/no_slot.py If there is anything more I can do to help you debug this, don't hesitate to ask. Short answer - use triggered() instead of activated(). Longer answer... I could reproduce the problem on Windows - but it's a Qt configuration issue, not a platform issue. activated() is part of the Qt3 support which is not enabled in the version of Qt included in the Windows installer, but it is enabled on my Linux system. BTW, using the new connect API would have shown the problem immediately. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] can't compile pykde (kdebindings)
On Mon Sep 28 07:33:17 BST 2009, Tamás Bajusz wrote: I'm trying to build a kdebindings package for UHU-Linux, but i can't. It was ok with previous stable releases of sip and pyqt4. python 2.6.2 qt 4.5.2 sip 4.9 pyqt4 4.6 kdebindings 4.3.0 /var/uhubuild/work/compile/python/pykde4/sip/kdecore/klocalizedstring.sip: In function 'QString klocalizedstring_i18n_template(KLocalizedString, PyObject*, int*)': /var/uhubuild/work/compile/python/pykde4/sip/kdecore/klocalizedstring.sip:9 2: error: 'sipClass_QString' was not declared in this scope It looks like a problem with some handwritten code, though I would expect that the generated files would contain the correct includes for this type. Maybe one of the Ubuntu gurus reading this list can suggest a possible cause for this - it seems to be packaged successfully for Ubuntu - or maybe you could ask on the kde-bindings mailing list. David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Promote Widget and QDockWidget
it seems that using a widget placeholder and promoting to dockwidget partially solve the problems. but I didn't succed in allowing dockable areas... any hint appreciated :) Giorgio -- View this message in context: http://www.nabble.com/Promote-Widget-and-QDockWidget-tp25635102p25646604.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] can't compile pykde (kdebindings)
Tamás Bajusz wrote: I'm trying to build a kdebindings package for UHU-Linux, but i can't. It was ok with previous stable releases of sip and pyqt4. python 2.6.2 qt 4.5.2 sip 4.9 pyqt4 4.6 kdebindings 4.3.0 It will work in the next KDE bug fix release of 4.3. It is already fixed in KDE's SVN. cheers, -- Simon Edwards | KDE-NL, Guidance tools, Guarddog Firewall si...@simonzone.com | http://www.simonzone.com/software/ Nijmegen, The Netherlands | ZooTV? You made the right choice. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] PyQt 4.6 (64b) on Snow Leopard the Symbol not found: _sipQtConnect - A longish tale
All, I spent the last couple of weeks running into the same issue with PyQt on Snow Leopard (10.6.1): compilation and installation ran without problems, but when I tried to import PyQt, I got the following message: Traceback (most recent call last): File string, line 1, in module ImportError: dlopen(/Users/pierregm/.local/lib/python2.6/site-packages/ PyQt4/QtCore.so, 2): Symbol not found: _sipQtConnect Referenced from: /Users/pierregm/.local/lib/python2.6/site-packages/ PyQt4/QtCore.so Expected in: flat namespace in /Users/pierregm/.local/lib/python2.6/site-packages/PyQt4/QtCore.so I'm using i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) and Python 2.6.1 (the Apple one, 64b). Because I'm using a 64b Python, I wanted to Qt to run both in 32b and 64b mode. I tried different Qt4 (the official 4.5.2 binaries, the official 4.5.2 sources) before settling on their latest 4.5 git branch (that's a pre-4.5.3). These sources compiled fine with the following arguments for ./configure: ./configure --prefix=${PREFIX} \ -release -opensource -shared -confirm-license \ -nomake examples -nomake demos -no-qt3support \ -cocoa -framework -arch x86 -arch x86_64 -platform macx-g+ +42 \ -I/usr/X11R6/include -L/usr/X11R6/lib -I/usr/local/include \ -verbose When I double-check my installation, Qt seems to work with both the i386 and x86_64 versions: lipo -info /usr/local/Cellar/qt/4.5.2/lib/QtCore.framework/Versions/ 4/QtCore Architectures in the fat file: /usr/local/Cellar/qt/4.5.2/lib/ QtCore.framework/Versions/4/QtCore are: x86_64 i386 I tried 20090919 snapshots of SIP and PyQt, then the latest sources (4.9 and 4.6 resp.), to no avail alas, _sipQtConnect was not to be found. The corresponding configuration arguments were: SIP : --arch=i386 --arch=x86_64 \ --bindir=${BINDIR} \ --destdir=${DESTDIR} \ --incdir=${INCDIR} \ --sipdir=${SIPDIR} PyQt : --bindir=${BINDIR} \ --destdir=${DESTDIR} \ --confirm-license \ --qsci-api \ --use-arch=i386 --use-arch=x86_64 --verbose A thread from 6 months ago (http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg16969.html ) gave me the idea to double-check the content of `configure.py` in PyQt-mac-gpl-4.6. In the `arch_config` function,I modified lines 908 and 909 from if a in ('i386', 'x86_64'): qmake_archs.append('x86') to if a in ('i386', 'x86_64'): qmake_archs.append('x86_64') reran python configure.py (with the same args), recompiled and bingo, PyQt4.QtCore can now be imported (and now I can use the Qt4Agg backend for matplotlib). So, OK, it works, fine. But I still wonder what happened. Did I find a bug ? Did I miss something ? Section 3.4 of the PyQt4 reference tells that by default Qt is 32b, so PyQt4 should be compiled as 32b. But in my case, Qt supports both, so I should be able to compile for the 2 arches, right ? Looking forward to reading your comments Cheers P. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] ANN: PyQt v4.6 and SIP v4.9 Released
On Montag, 28. September 2009, Serge Montagnac wrote: Phil Thompson wrote: PyQt v4.6 and SIP v4.9 have been released and are available from the usual places. This more or less completes the development identified in the (now discarded) roadmap. In particular it means that QString and QVariant can be made to disappear completely. This is the default if you are using Python v3. Python v2 retains the old behaviour (for obvious compatibility reasons) but you can select the new behaviour using the new sip.setapi() call. All the examples will still run under Python v2 and v3. See the respective NEWS files for the details. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt Hi Phil, Standard report ... ;-( more precisely: linux mandriva cooker distrib after upgrading and eric4 launch : [se...@dualstar]$ eric4 Traceback (most recent call last): File /usr/lib/python2.6/site-packages/eric4/eric4.py, line 47, in module from KdeQt.KQApplication import KQApplication File /usr/lib/python2.6/site-packages/eric4/KdeQt/__init__.py, line 20, in module import Preferences File /usr/lib/python2.6/site-packages/eric4/Preferences/__init__.py, line 26, in module from PyQt4 import Qsci RuntimeError: the sip module implements API v6.0 but the PyQt4.Qsci module requires API v5.0 Seems the Mandriva people forgot to update/regenerate the QScintilla Python bindings. This is a problem that happened several times with other distros in the past. Please let them know. Regards, Detlev -- Detlev Offenbach det...@die-offenbachs.de ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] ANN: PyQt v4.6 and SIP v4.9 Released
I just upgraded and I get problems patching at the instance level. I used to patch my own 'customEvent' on the QApplication at the instance level. This doesn't work anymore. Patching still works at the class level. The following code illustrates this: from PyQt4.QtCore import * from PyQt4.QtGui import * class App(QApplication): def customEvent(self, event): print 'inherited', event if __name__ == '__main__': def classPatch(self, event): print 'classPatch', event def instancePatch(event): print 'instancePatch', event # This still works # App.customEvent = classPatch app = App([]) # This used to work but doesn't anymore. # app.customEvent = instancePatch QApplication.sendEvent(app, QEvent(1000)) widget = QWidget() widget.show() app.exec_() On Sep 26, 2009, at 11:13 AM, Phil Thompson wrote: PyQt v4.6 and SIP v4.9 have been released and are available from the usual places. This more or less completes the development identified in the (now discarded) roadmap. In particular it means that QString and QVariant can be made to disappear completely. This is the default if you are using Python v3. Python v2 retains the old behaviour (for obvious compatibility reasons) but you can select the new behaviour using the new sip.setapi() call. All the examples will still run under Python v2 and v3. See the respective NEWS files for the details. Phil ___ 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] Snow Leopard
Ah, this verification from the python man page: Note that the preference files and environment variable that apply to the python command, do not apply when running a specific version of Python. In particular, running python2.6 will always default to 64- bit execution (unless one uses the arch(1) command to specifically select a 32-bit architecture). Since the system will execute a program with the default arch for the system, python must fork/spawn/whatever to reexecute with the 32bit arch. I remember another problem I ran into, with wxpython. Since it needs pythonw, a program started with python must re-execute with pythonw. This caused a program (GRASS wxpython GUI) to quietly die (even when forced to run in 32bit mode). We never had a problem with it before Snow. I ripped out the reexecute code and made it start with pythonw directly, with no problem. Maybe reexecuting (in 32bit mode, from 64bit mode) is a problem now? On Sep 28, 2009, at 10:59 AM, Michael Held wrote: hey william, thanks for your hints, you are right: /usr/bin/python responds to VERSIONER_PYTHON_PREFER_32_BIT and VERSIONER_PYTHON_VERSION, but NOT to 'arch -i386' /usr/bin/python2.6 OR /System/Library/Frameworks/Python.framework/ Versions/2.6/bin/python responds to 'arch -i386' but NOT to VERSIONER_PYTHON_PREFER_32_BIT I convinced PyDev to use Apples Python in 32bit (by adding /usr/ bin/python as interpreter) and forced PyQt4 to the PYTHONPATH of my Eclipse project. and again - CRASH. I add the somewhat meaningless Apple traceback here. maybe it's helpful for the core PyQt guys. thanks a lot! michael - William Kyngesburye kyngchaos*at*kyngchaos*dot*com http://www.kyngchaos.com/ Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life. - Marvin ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Form/dialog without title bar and actions buttons
Am Montag 28 September 2009 schrieb zorze: Hi, I'm a newbee in Qt/PyQt but I'm starting to use it. Welcome to the PyQt wonderlands ;-) The first problem that I need to solve is how to remove the title bar from a Dialog/MainWindow? Could you be more specific about your goals? Are you really after the effects of killall $WINDOWMANAGER? Without title bars, users usually cannot resize nor move their windows! Anyway, programmatically, you can play with QWidget.setWindowFlags(...). Real fun starts with sticky windows, skipping taskbars and pagers, title bars without close/min/max buttons and the like.. Enjoy, Pete ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] older sip version
Hi, Where can I download sip 4.7.8? I need to build PyQt 4.4. Any newer version of sip doesn't work with that. Thanks, Clint ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Signal this way
Hi, I am creating QAction in a loop and adding it to menu. action = QtGui.QAction(QtGui.QIcon(iconFile), fileName, menu) menu.addAction(action) I need to connect this action to a python function in such a way that I should get text of QAction or instance of QAction object itself. Python function: If action name is required def contextMenuAction(self, actionName): print actionName If action object is required def contextMenuAction(self, actionObject): myData = actionObject.data() How do I setup action and slot? Logically it would be like this: self.connect(action, QtCore.SIGNAL(triggered()), self, QtCore.SLOT(contextMenuAction(str)), fileName) self.connect(action, QtCore.SIGNAL(triggered()), self, QtCore.SLOT(contextMenuAction(object)), action) Cheers Prashant Python 2.5.2 PyQt-Py2.5-gpl-4.4.3-1 Win XP, 32 Bit -- View this message in context: http://www.nabble.com/Signal-this-way-tp25655744p25655744.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
RE: [PyQt] ANN: PyQt v4.6 and SIP v4.9 Released
Can't compile sip 4.9 with mingw on WinXP pyqthon 2.6.2 Qt 2009.03 SDK + mingw version which comes with SDK. Error text - something about undefined reference in 'py_struct' etc... I'm only one with this problem? --- i...@tyumbit.ru ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt