[PyQt] Segfault with QDesktopServices.openUrl

Kovid Goyal kovid at kovidgoyal.net
Fri Aug 22 10:52:10 BST 2014


On Fri, Aug 22, 2014 at 09:41:01AM +0000, David Boddie wrote:
> On Fri Aug 22 03:49:59 BST 2014, Kovid Goyal wrote:
> 
> > On Fri, Aug 22, 2014 at 12:02:10AM +0200, David Boddie wrote:
> 
> [...]
> 
> > > Sure, but there's no going back now. Have you considered using a pure Python
> > > alternative, such as the desktop module?
> > > 
> > >   https://pypi.python.org/pypi/desktop
> >
> > For me, depending on QApplication is not a problem. I have written a
> > headless QPA plugin that means that constructing a QApplication is very
> > cheap and requires no running X server on linux.
> 
> Is the code online somewhere? I wrote something similar for a server side
> application. It would be interesting to know if there were some tricks I
> missed:

https://github.com/kovidgoyal/calibre/tree/master/src/calibre/headless

It basically uses a QImage as the backend (this bit is copied from the
builtin minimal plugin) and uses fontconfig for fonts and the generic
unix implementation of desktop services.


> 
> https://github.com/david-boddie-met-no/qt4-headless/tree/master/debian/patches
> 
> > But, thanks for the
> > link, I was not aware of the python desktop package, it looks useful,
> > especially since Qt 5 seems very reluctant to use the desktop
> > environment based file open dialogs.
> 
> I think that desktop support in Qt is still recovering from the narrow
> mobile focus of the past few years. I don't know whether Qt 5 is any
> better or worse in this respect.

Indeed, the entire detour into mobile was a bit of a train-wreck from my
perspective. 

Kovid.

-- 
_____________________________________

Dr. Kovid Goyal 
http://www.kovidgoyal.net
http://calibre-ebook.com
_____________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140822/5158df52/attachment.sig>


More information about the PyQt mailing list