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? Problem solved, Qt 4.4 rc 1 seems to fix this. I can work around the Oxygen menus text not appearing issue with this patch to kdebase/runtime/kstyles/oxygen http://kubuntu.org/~jriddell/oxygen-python-menus-text.diff which just stops oxygen doing whatever it does to menus text. KStandardAction doesn't seem to have the necessary c++ slot to python slot changes needed, this app doesn't work http://kubuntu.org/~jriddell/tmp/kapplication.py Jonathan ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
KStandardAction doesn't seem to have the necessary c++ slot to python slot changes needed, this app doesn't work http://kubuntu.org/~jriddell/tmp/kapplication.py KStandardAction.close(self, self.hideMainWindow, self.actionCollection()) Try KStandardAction.close(self.hideMainWindow, self.actionCollection()) PyKDE and PyQt slot specifications only specify the slot method or function, not the slot's owner (first 'self') and method (self.hideMainWindow). Otherwise, if you were using the Qt syntax, the slot name would be a char *, not a method address. The close() method is included in KStandardAction inPyKDE (see sip/.kdeui/kstandardaction.sip). Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
* Detlev Offenbach [Sat, 05 Apr 2008 12:40:35 +0200]: Due to the fact that the Oxygen theme is the standard KDE4 theme, the fact that PyKDE4 doesn't show the menus will be a really big drawback for it and might lead to the point, that only few applications will be written (or a lot of complaints will arise). IMHO, this problem should be fixed asap. For now, I'm doing this in my application: if QtGui.QApplication.style().objectName() == 'oxygen': QtGui.QApplication.setStyle('Cleanlooks') Not that is a proper fix, but better than no menus at all in my opinion. Cheers, -- Adeodato Simó dato at net.com.org.es Debian Developer adeodato at debian.org The first step on the road to wisdom is the admission of ignorance. The second step is realizing that you don't have to blab it to the world. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] dbus and PyKDE
... 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). Due to the fact that the Oxygen theme is the standard KDE4 theme, the fact that PyKDE4 doesn't show the menus will be a really big drawback for it and might lead to the point, that only few applications will be written (or a lot of complaints will arise). IMHO, this problem should be fixed asap. BTW, pure PyQt4 shows the menus correctly when used with the Oxygen style. Importing some PyKDE4 modules triggeres the faulty behavior. Regards, Detlev -- Detlev Offenbach [EMAIL PROTECTED] ___ 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] 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] 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] 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
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] dbus and PyKDE
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? Jonathan ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt