Re: [PyQt] Dock widgets and window's lost of focus.
2008/3/26, IloChab [EMAIL PROTECTED]: I designed a main window that contains 1 tableView and 3 dockWidgets. If I use it on top of other windows, it works fine. If I let it under other windows, when recall it on top, I find the 3 dockWidget gone (they automatically closed), and if I reopen them manually (through a menu action) they come up correctly and I find all the text that my application output meanwhile into them. Why does this happen? What did I do wrong? I found out that this behaviour doesn't depend on my application. If I just run the window alone (only the ui file, I mean) I get a similar behaviour. 1) I run the script and I get 1 tableView and 3 dockWidgets 2) I minimize the window 3) I reopen the window and the 3 dockWidgets are gone. Please help. I really need an help on this one !! My window turns blank even if I let it open on a desktop and I switch to an other one. I think it could be related with the focus lost, but I really don't know what to do. I work on Fedora 8 with KDE. My configuration is: qt4-4.3.3-1.fc8 qt4-devel-4.3.3-1.fc8 qt4-x11-4.3.3-1.fc8 PyQt4-devel-4.3.3-1.fc8 PyQt4-4.3.3-1.fc8 python 2.5.1 Perhaps I made a bad design in my window, it's the first time I use dock widgets and perhaps I used them in a wrong way. Please, give me any idea how to solve my problem. Grazie! Licia ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Proposed fix for rare-used types of properties in the uic module
On Tuesday 25 March 2008, Vsevolod Novikov wrote: Hello All, I've found that uic module doesn't recognize some rare-used types of properties (which can be added as dynamic properties in the designer): - StringList - Char - UInt - LongLong - ULongLong - SizeF - Point - PointF - RectF The applied patch is a proposed fix for the PyQt4/uic/properties.py file to make these types of properties available. I am using PyQt4 version 4.3.3 with Qt v.4.3.3 Regards, Vsevolod Novikov Consul-Incom Ltd, Nizhny Novgorod Russia Applied (with some changes). Thanks, Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Re: [PyKDE] KConfigSkeleton/KConfigDialog combo not working
On Thursday 27 March 2008 08:32, Adeodato Simó wrote: Hello. I'm having trouble porting my PyKDE3 KConfigSkeleton/KConfigDialog: it behaves weird in KDE4. I'm attaching a very small sample program. The weird behavior I'm observing is: (a) on the first run, when no testrc file exists under ~/.kde, the value of MyOption is correctly set to False, but when I click on the Preferences button, the checkbox is checked (instead of not checked, at it'd correspond) (b) so I change in the dialog the value to True, when closing the dialog the LineEdit updates accordingly, and the option is written as true to the testrc file, but when I restart the program, it is set to False again Can you reproduce? Is there something wrong with my code? (With KDE 3 it worked just fine). I'm still looking into this - it doesn't look like it's going to fixed quickly. Just thought I'd let you know. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
On Thursday 27 March 2008, Jonathan Riddell wrote: I'm trying to get a printer applet into KDE (see kde-core-devel), however I can't actually use pyKDE because oxygen style and KApplication load QtDbus which causes the application to freeze when I'm using python-dbus. For example this app freezes when using KApplication but not when using QApplication. http://kubuntu.org/~jriddell/tmp/minimal.py Does anyone have any ideas on how to work around this? If KDE4 programs require QtDbus, and it's not possible to have two different DBus implementations in the same process then we clearly have a problem - but I don't know what the problem is. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] PyKDE4-4.0.2-1 release available
On Friday 21 March 2008 11:24, Danny Pansters wrote: I've been trying to get this to build on FreeBSD, but the build fails with both gcc34 and gcc42: Sorry for the slow response - my email to Phil got delayed by a screwup in my mail system. Phil noticed that the methods in the error output all involved mode_t and time_t. PyKDE4 typedefs those as uint and long respectively in sip/kdecore/typedefs.sip. If FreeBSD is 2038-safe, then time_t is probably 64 bit. Would you be able to find the correct types for FreeBSD, fix typedefs.sip, and try a rebuild/recompile (you'll need to rebuild kdecore and kio at a minimum)? Let me know if that works. If it does, I'll figure out a permanent fix. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Re: [PyKDE] KConfigSkeleton/KConfigDialog combo not working
On Thursday 27 March 2008 08:32, Adeodato Simó wrote: Hello. I'm having trouble porting my PyKDE3 KConfigSkeleton/KConfigDialog: it behaves weird in KDE4. I'm attaching a very small sample program. The weird behavior I'm observing is: (a) on the first run, when no testrc file exists under ~/.kde, the value of MyOption is correctly set to False, but when I click on the Preferences button, the checkbox is checked (instead of not checked, at it'd correspond) (b) so I change in the dialog the value to True, when closing the dialog the LineEdit updates accordingly, and the option is written as true to the testrc file, but when I restart the program, it is set to False again Can you reproduce? Is there something wrong with my code? (With KDE 3 it worked just fine). Progress report: OK - I figured out what's wrong. Now I have to figure out how I want to fix it permanently (affects most of the KConfigSkeletonItem subclasses - Item*) I should have a new release up sometime next week. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Nullable foreign keys
Catriona Johnson ha scritto: My question is how do I handle nullable foreign keys? If foreign key is null it is not being displayed in the QTableView and there seems to be no way of having a null value in a combo box apart from having a 'Null' record which I don't really want to do. I solve this issue by inserting a row with the ID field -1 and the rest of the columns as null except where there is a foreign key, in which I insert the value of -1. My bad english plays against me, so consider this example: table_1: ID integer primary key autoincrement, DESCRIPTION text, FK_TO_TABLE_2 integer; TABLE_2: ID integer primary key autoincrement, DESCRIPTION text; The inserted rows are: TABLE_2: insert into TABLE_2(ID) values (-1); TABLE_1: insert into TABLE_1(ID, FK_TO_TABLE_2) values (-1, -1); HTH! Simone Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Re: [PyKDE] KConfigSkeleton/KConfigDialog combo not working
* Jim Bublitz [Fri, 28 Mar 2008 15:56:25 -0800]: OK - I figured out what's wrong. Now I have to figure out how I want to fix it permanently (affects most of the KConfigSkeletonItem subclasses - Item*) I should have a new release up sometime next week. Ooh, these are excellent news, thanks! Cheers, -- Adeodato Simó dato at net.com.org.es Debian Developer adeodato at debian.org Education is what remains after one has forgotten everything he learned in school. -- Albert Einstein ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] PyKDE4-4.0.2-1 release available
On Friday 28 March 2008 19:50:04 Jim Bublitz wrote: On Friday 21 March 2008 11:24, Danny Pansters wrote: I've been trying to get this to build on FreeBSD, but the build fails with both gcc34 and gcc42: Sorry for the slow response - my email to Phil got delayed by a screwup in my mail system. Phil noticed that the methods in the error output all involved mode_t and time_t. PyKDE4 typedefs those as uint and long respectively in sip/kdecore/typedefs.sip. If FreeBSD is 2038-safe, then time_t is probably 64 bit. Would you be able to find the correct types for FreeBSD, fix typedefs.sip, and try a rebuild/recompile (you'll need to rebuild kdecore and kio at a minimum)? Let me know if that works. If it does, I'll figure out a permanent fix. Jim Alright, this works: --- typedefs.sip.orig 2008-03-29 15:03:08.0 +0100 +++ typedefs.sip.new2008-03-29 17:12:08.0 +0100 @@ -20,11 +20,11 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see http://www.gnu.org/licenses/. -typedef uint mode_t; +typedef ushort mode_t; -typedef long time_t; +typedef int time_t; -typedef ulong size_t; +typedef uint size_t; typedef int ssize_t; @@ -36,7 +36,7 @@ typedef uint WFlags; -typedef long off_t; +typedef qlonglong off_t; typedef uint uid_t; For completeness: FreeBSD typedefs [qglobal.h] [on i386] unsigned int size_t [uint] [uint32_t] inttime_t [int] [int32_t] intssize_t [int] [int32_t] intpid_t [int] [int32_t] unsigned short mode_t [ushort][int16_t] long long off_t [qlonglong] [int64_t] unsigned int uid_t [uint] [uint32_t] unsigned int gid_t [uint] [uint32_t] Why are you not getting these from qplatformdefs.h but instead redefine them? I get exactly one warning during compile, should this be worrying (dont think so): c++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -fno-strict-aliasing -pipe -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -I. -I../extra/kde402 -I/usr/local/kde4/include -I/usr/local/include/QtCore -I/usr/local/include/QtGui -I/usr/local/include/QtXml -I/usr/local/include/QtSvg -I/usr/local/kde4/include/solid -I/usr/local/kde4/include/kio -I/usr/local/kde4/include/kfile -I/usr/local/kde4/include/kssl -I/usr/local/include/python2.5 -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I/usr/local/include -o sipkioKIOJobUiDelegate.o sipkioKIOJobUiDelegate.cpp sipkioKIOJobUiDelegate.cpp: In function `PyObject* meth_KIO_JobUiDelegate_askFileRename(PyObject*, PyObject*)': sipkioKIOJobUiDelegate.cpp:747: warning: converting of negative value `-0x1' to `long long unsigned int' sipkioKIOJobUiDelegate.cpp:748: warning: converting of negative value `-0x1' to `long long unsigned int' Anyway, thanks for the hint. If it's tedious to fix it on your end, it's no problem for me to just patch typedefs.sip in the freebsd port. Cheers, Dan ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] PyKDE4-4.0.2-1 release available
On Saturday 29 March 2008 09:25, you wrote: On Friday 28 March 2008 19:50:04 Jim Bublitz wrote: On Friday 21 March 2008 11:24, Danny Pansters wrote: I've been trying to get this to build on FreeBSD, but the build fails with both gcc34 and gcc42: Sorry for the slow response - my email to Phil got delayed by a screwup in my mail system. Phil noticed that the methods in the error output all involved mode_t and time_t. PyKDE4 typedefs those as uint and long respectively in sip/kdecore/typedefs.sip. If FreeBSD is 2038-safe, then time_t is probably 64 bit. Would you be able to find the correct types for FreeBSD, fix typedefs.sip, and try a rebuild/recompile (you'll need to rebuild kdecore and kio at a minimum)? Let me know if that works. If it does, I'll figure out a permanent fix. Jim Alright, this works: --- typedefs.sip.orig 2008-03-29 15:03:08.0 +0100 +++ typedefs.sip.new2008-03-29 17:12:08.0 +0100 @@ -20,11 +20,11 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see http://www.gnu.org/licenses/. -typedef uint mode_t; +typedef ushort mode_t; -typedef long time_t; +typedef int time_t; -typedef ulong size_t; +typedef uint size_t; typedef int ssize_t; @@ -36,7 +36,7 @@ typedef uint WFlags; -typedef long off_t; +typedef qlonglong off_t; typedef uint uid_t; For completeness: FreeBSD typedefs [qglobal.h] [on i386] unsigned int size_t [uint] [uint32_t] inttime_t [int] [int32_t] intssize_t [int] [int32_t] intpid_t [int] [int32_t] unsigned short mode_t [ushort][int16_t] long long off_t [qlonglong] [int64_t] unsigned int uid_t [uint] [uint32_t] unsigned int gid_t [uint] [uint32_t] Why are you not getting these from qplatformdefs.h but instead redefine them? Because sip, when generating code, doesn't have access to any h files, so typedefs need to be provided in a .sip file. But thanks for the pointer to the h file - I wasn't aware of it. I get exactly one warning during compile, should this be worrying (dont think so): c++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -fno-strict-aliasing -pipe -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -I. -I../extra/kde402 -I/usr/local/kde4/include -I/usr/local/include/QtCore -I/usr/local/include/QtGui -I/usr/local/include/QtXml -I/usr/local/include/QtSvg -I/usr/local/kde4/include/solid -I/usr/local/kde4/include/kio -I/usr/local/kde4/include/kfile -I/usr/local/kde4/include/kssl -I/usr/local/include/python2.5 -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I/usr/local/include -o sipkioKIOJobUiDelegate.o sipkioKIOJobUiDelegate.cpp sipkioKIOJobUiDelegate.cpp: In function `PyObject* meth_KIO_JobUiDelegate_askFileRename(PyObject*, PyObject*)': sipkioKIOJobUiDelegate.cpp:747: warning: converting of negative value `-0x1' to `long long unsigned int' sipkioKIOJobUiDelegate.cpp:748: warning: converting of negative value `-0x1' to `long long unsigned int' That happens because KDE programmers assign default argument values = -1 for unsigned types, and I've never been consistent in correcting that in the sip files. I should probably add a fix during my code generation from the h files, but it becomes a problem because unsigned long long, for example, can be written half a dozen different ways, and KDE uses all of them, plus typedefs.. Anyway, thanks for the hint. If it's tedious to fix it on your end, it's no problem for me to just patch typedefs.sip in the freebsd port. What does uname report for FreeBSD? I can check for that and swap in the correct typedefs.sip. I have some other fixes, so it'll be a few days before I release a tarball. If you want to go ahead and substitute a FreeBSD typedefs.sip for now, that's fine. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Two problems with QSystemTrayIcon
I know it's been a while since you posted (and even long since I've read the list archives), so maybe you have figured this out already, but just in case (and so future folks can Google it)... In order to make the tray icon disappear properly, you need to call hide() or setVisible(False) on it first, but of course you have to do that within your main loop. So you'll probably need to hook your quit signal up to a helper function that will hide the tray, then actually exit. Hope this helps, -Adam Batkin duncan duncan wrote: Hello. I am trying to put an icon into the system tray area using QSystemTrayIcon. All work well except when I close the program. I put the icon in the area using this code: icon=QtGui.QIcon(pixmaps/todo_list.png) systray=QtGui.QSystemTrayIcon(icon) #systray.setIcon(icon) menu = QtGui.QMenu() quitAction = menu.addAction('Quit') systray.setContextMenu(menu) quitAction.connect(quitAction, QtCore.SIGNAL(triggered()), ui.QuitApp) systray.show() sys.exit(app.exec_()) - I have two minor problems: 1) when I close the program, the icon stay in the tray area until I move the mouse pointer over it, at this point it go away 2) after exiting from the program, I get this error: QApplication::qAppName: Please instantiate the QApplication object first I have the feeling that the two problems are connected, but I cannot find a clue I am working with Qt 4.3.3 and PyQt4.3.3.2 under Windows XP Any suggestions ? thanks in advance Gianluca ___ 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] dbus and PyKDE
On Thursday 27 March 2008 10:11, Jonathan Riddell wrote: I'm trying to get a printer applet into KDE (see kde-core-devel), however I can't actually use pyKDE because oxygen style and KApplication load QtDbus which causes the application to freeze when I'm using python-dbus. For example this app freezes when using KApplication but not when using QApplication. http://kubuntu.org/~jriddell/tmp/minimal.py Does anyone have any ideas on how to work around this? I haven't ignored this - I just need to rebuild PyQt with dbus support to check it out (and had another bug fix in the queue).. I also don't have the Python cups module, and can't seem to find it for SuSE 10.3 (download.opensuse.org is also down at the moment). Any idea where I can find the source for it? I doubt it's the problem though, but won't know until I finish rebuilding. QtDBus shows up if you ldd any of the PyKDE4 modules, but it's not expressly linked by PyKDE4, so one of the Qt or KDE libs is sucking it in. And - menus don't work in PyKDE4 with the Oxygen theme. Haven't gotten to that yet either (and am not looking forward to it). Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] error building PyKDE 4.0.2-1 - QTDIR not respected
On Monday 24 March 2008 12:43:34 pm Jim Bublitz wrote: On Monday 24 March 2008 07:31, Giacomo Lacava wrote: Hi, I can't build PyKDE 4.0.2-1, even though KDE 4.0.2 is installed. It seems it cannot find the Qt include files, even though QTDIR is set to a symbolic link (/home/pyqt-trunk/share/qt4) pointing to the correct /home/pyqt-trunk/share/qt4.3.3. The mentioned includes That's fixed in PyKDE4-4.0.2-2, which is up at riverbankcomputing.com. Would you please post a link? I only see PyKDE4-4.0.2-1, and http://www.riverbankcomputing.com/Downloads/PyKDE4/PyKDE4-4.0.2-2.tar.bz2 is not found. Thanks, Darren ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
On Thursday 27 March 2008 10:11, Jonathan Riddell wrote: I'm trying to get a printer applet into KDE (see kde-core-devel), however I can't actually use pyKDE because oxygen style and KApplication load QtDbus which causes the application to freeze when I'm using python-dbus. For example this app freezes when using KApplication but not when using QApplication. http://kubuntu.org/~jriddell/tmp/minimal.py Does anyone have any ideas on how to work around this? With QApplication, I get: Traceback (most recent call last): File minimal.py, line 63, in module applet = PrinterApplet() File minimal.py, line 33, in __init__ bus_name = dbus.service.BusName (PDS_OBJ, bus=bus) File /usr/lib/python2.5/site-packages/dbus/service.py, line 113, in __new__ retval = bus.request_name(name, name_flags) dbus.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection :1.102 is not allowed to own the service com.redhat.NewPrinterNotification due to security policies in the configuration file That's the same point at which the program hangs using KApplication. (That's also without Oxygen, which is a different problem). KApplication uses QtDBus, so there's no eliminating that. That should ensure the application gets automatically registered though. You can change the organization domain via KAboutData - didn't try that though. I guess what I'd try is some simpler stuff - see if you can communicate via DBus at all, query for available services - in general, see if anything works. If it doesn't, maybe it'll turn up something that provides more insight. Send me whatever you come up with (working or not) and I'll see where I can go from there. I really have no understanding of the whole subject and it looks like a few weeks of learning curve for me to dig into it much more. Doesn't look like a quick fix is available from this end, but I'm certainly willing to go at it. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] PyKDE4-4.0.2-1 release available
On Friday 28 March 2008 19:50:04 Jim Bublitz wrote: On Friday 21 March 2008 11:24, Danny Pansters wrote: I've been trying to get this to build on FreeBSD, but the build fails with both gcc34 and gcc42: Sorry for the slow response - my email to Phil got delayed by a screwup in my mail system. Phil noticed that the methods in the error output all involved mode_t and time_t. PyKDE4 typedefs those as uint and long respectively in sip/kdecore/typedefs.sip. If FreeBSD is 2038-safe, then time_t is probably 64 bit. Would you be able to find the correct types for FreeBSD, fix typedefs.sip, and try a rebuild/recompile (you'll need to rebuild kdecore and kio at a minimum)? Let me know if that works. If it does, I'll figure out a permanent fix. Jim Just to follow up and recap some private mails to the mailing list (-archive) because it may be of interest for folks using other OS's: yes, some or most of the typedefs at the top of typedefs.sip may need to be patched (see your qplatformdefs.h) for your OS. This is probably mostly interesting for people who are porting or packaging PyKDE4. Cheers, Dan ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
On Thursday 27 March 2008 10:11, Jonathan Riddell wrote: I'm trying to get a printer applet into KDE (see kde-core-devel), however I can't actually use pyKDE because oxygen style and KApplication load QtDbus which causes the application to freeze when I'm using python-dbus. For example this app freezes when using KApplication but not when using QApplication. http://kubuntu.org/~jriddell/tmp/minimal.py Does anyone have any ideas on how to work around this? I get the same result for KApplication as QApplication (exception, no hang) if I make set_as_default=False in the statement that sets up mainloop. Seems to make no difference which way it's set with QApplication. Hope that helps - I still have a pretty limited understanding of the whole thing. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] How to prevent a QDialog being resized?
Hello, My question is as subject. I tried setMaximumSize, setMaximumHeight, setMaximumWidth, etc. and could not get it right. Thanks. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
On Thu Mar 27 17:11:52 GMT 2008, Jonathan Riddell wrote: I'm trying to get a printer applet into KDE (see kde-core-devel), however I can't actually use pyKDE because oxygen style and KApplication load QtDbus which causes the application to freeze when I'm using python-dbus. Can you post a link to the relevant thread in the mail archives? For example this app freezes when using KApplication but not when using QApplication. http://kubuntu.org/~jriddell/tmp/minimal.py Does anyone have any ideas on how to work around this? Without knowing more about the way events are handled in the QtDBus and python-dbus implementations, it's difficult to give you advice. There may be a way to make them play well together, but perhaps this will involve digging around in the low-level Python dbus API or even in the internal _dbus_bindings module. I imagine you've already looked into this. Did you make any progress? David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
On Sat, Mar 29, 2008 at 09:18:00PM -0800, Jim Bublitz wrote: On Thursday 27 March 2008 10:11, Jonathan Riddell wrote: I'm trying to get a printer applet into KDE (see kde-core-devel), however I can't actually use pyKDE because oxygen style and KApplication load QtDbus which causes the application to freeze when I'm using python-dbus. For example this app freezes when using KApplication but not when using QApplication. http://kubuntu.org/~jriddell/tmp/minimal.py Does anyone have any ideas on how to work around this? I haven't ignored this - I just need to rebuild PyQt with dbus support to check it out (and had another bug fix in the queue).. I also don't have the Python cups module, and can't seem to find it for SuSE 10.3 (download.opensuse.org is also down at the moment). Any idea where I can find the source for it? I doubt it's the problem though, but won't know until I finish rebuilding. http://cyberelk.net/tim/software/pycups/ QtDBus shows up if you ldd any of the PyKDE4 modules, but it's not expressly linked by PyKDE4, so one of the Qt or KDE libs is sucking it in. And - menus don't work in PyKDE4 with the Oxygen theme. Haven't gotten to that yet either (and am not looking forward to it). But it's why we love you. Jonathan ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
On Sun, Mar 30, 2008 at 08:12:07PM -0800, Jim Bublitz wrote: On Thursday 27 March 2008 10:11, Jonathan Riddell wrote: I'm trying to get a printer applet into KDE (see kde-core-devel), however I can't actually use pyKDE because oxygen style and KApplication load QtDbus which causes the application to freeze when I'm using python-dbus. For example this app freezes when using KApplication but not when using QApplication. http://kubuntu.org/~jriddell/tmp/minimal.py Does anyone have any ideas on how to work around this? I get the same result for KApplication as QApplication (exception, no hang) if I make set_as_default=False in the statement that sets up mainloop. Seems to make no difference which way it's set with QApplication. Right, with QApplication QtDbus doesn't get loaded and everything works, with KApplication QtDbus does get loaded and it freezes if using python-dbus with the Qt mainloop (setting set_as_default=False makes it use the glib mainloop, no freeze but you won't get any dbus signals either). Trolltech tell me they can't recreate it in Qt 4.4 RC 1 so maybe this has been magically fixed, we should find out tomorrow. Jonthan ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] KProcess setUsePty not there...
Hi, I want to run a program that insists on reading from a terminal using KProcess (from within PyKDE), but it seems KProcess::setUsePty() does not exist: Python 2.5.1 (r251:54863, Mar 26 2008, 22:37:08) [GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2 Type help, copyright, credits or license for more information. from kdecore import * p=KProcess() p.setUsePty(3,False) Traceback (most recent call last): File stdin, line 1, in module AttributeError: setUsePty KDE: 3.5.8 dev-python/sip: 4.7.3 dev-python/pykde: 3.16.0 dev-python/PyQt: 3.17.4 How can I fix this? with best regards, Wilbert Berendsen -- http://www.wilbertberendsen.nl/ Met vriendelijke groet, Wilbert Berendsen -- http://www.wilbertberendsen.nl/ You must be the change you wish to see in the world. -- Mahatma Gandhi ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Question on QListWidget's selectedItems Method
Hello group, I asked a couple of questions about PyQt on the CLP mailing list, but didn't get an answer. Can some please take a look? http://groups.google.com/group/comp.lang.python/browse_thread/thread/087d5cacaa3e2bbb/826adf752bb41c7e#826adf752bb41c7e Thank you! ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] SIP: Subclassing QMdiSubWindow
Hi, the QtiPlot project actually uses pyQt and SIP for its python bindings. Among others, the 'Table' class is prepared to be accessed from python. It inherits from QMdiSubWindow and another class not related to Qt. The code below creates a new Table instance, but obviously python supposes it to be a QMdiSubWindow object. [...] t = newTable() print t.__class__ results in: class 'PyQt4.QtGui.QMdiSubWindow' So, it is not recognized as Table object and thus has no table specific attributes. [...] Is this related to a problem with the %ConvertToSubClassCode macro since a Table instance is not casted correctly and falls back to the base class? How is subclassing handled correctly by SIP especially in that case? Could one give me an example? Regards Florian ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Regression in sip 4.7.4 sip: QPixmap has not been defined
Hello and apologies for the delay, On Tue, 2008-03-25 at 09:11 +, Phil Thompson wrote: On Monday 24 March 2008, Adam C Powell IV wrote: Greetings, I am trying to build the Salomé suite from http://www.salome-platform.org/ which built just fine with sip 4.7.3 but now is not working with 4.7.4. More specifically, I am trying to build the Debian package at http://lyre.mit.edu/~powell/salome/ and running into trouble as described at Debian bug 469850 http://bugs.debian.org/469850 . The sip command is: /usr/bin/sip -t WS_X11 -t Qt_3_3_8b -x Qt_STYLE_INTERLACE -x Qt_STYLE_WINDOWSXP -x Qt_ASSISTANTCLIENT -s .cc -c . -I /usr/share/sip/qt/qt SALOME_PYQT_GUI.sip and although qpixmap.sip is right in the path, it gives an error: sip: QPixmap has not been defined Given that this worked fine with 4.7.3, either sip or its Debian package seems to be broken. How can I investigate further? Produce a small test case that demonstrates the problem against the standard SIP and PyQt packages. Phil Sorry about the delay. I'm attaching a small (trivial) file which fails in this way. sip does not attempt to open any other files in this directory. strace output is at http://lyre.mit.edu/~powell/salome/build-deps/sip.trace As you can see, it finds qpixmap.sip, and seems to die soon after reading the last of the .sip files (at least soon in the trace). How can I diagnose further? Cheers, -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Engineering consulting with open source tools http://www.opennovation.com/ %Module SalomePyQtGUI %Import qtmod.sip ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] KProcess setUsePty not there...
On Wednesday 02 April 2008 08:00, Wilbert Berendsen wrote: Hi, I want to run a program that insists on reading from a terminal using KProcess (from within PyKDE), but it seems KProcess::setUsePty() does not exist: Python 2.5.1 (r251:54863, Mar 26 2008, 22:37:08) [GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2 Type help, copyright, credits or license for more information. from kdecore import * p=KProcess() p.setUsePty(3,False) It's an error in not providing a #define for a conditional in the h file when generating PyKDE. You can fix it in sip/kdecore/kprocess.sip by changing this (near line 193): %If ( KDE_3_2_0 - KDE_3_4_0 ) void setUsePty (KProcess::Communication, bool); KPty*pty () const; %End to this: %If ( KDE_3_2_0 - ) void setUsePty (KProcess::Communication, bool); KPty*pty () const; %End and then rebuild with python configure.py -lkdecore make su -cmake install Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt