[Development] Can QImage format plugins require QGuiApplication?

Thiago Macieira thiago.macieira at intel.com
Mon Apr 13 19:14:03 CEST 2020


On Monday, 13 April 2020 13:50:17 -03 Kevin Kofler wrote:
> Hi,
> 
> I have a question concerning development of plugins for Qt, so hopefully it
> is not entirely off-topic here:
> 
> Today, a user on #fedora-kde ran across a crash which resulted from:
> * a GTK+/GNOME application (Jami) using (for some reason) QImage to load
>   images, without a QGuiApplication or QApplication constructed, vs.
> * a QImage format plugin (QtPBFImagePlugin) using font APIs that require
>   QGuiApplication and abort otherwise.
> 
> Obviously, one or the other must be wrong. So, who is to blame?

Not using QGuiApplication, though that clearly makes the Qt API unable to be 
used outside of an actual Qt application.

> I have looked at the documentation, but I was not able to find a definite
> answer to my question there either. I see that, e.g.,
> QImageReader::supportedImageFormats() is documented as requiring
> QApplication, but I do not know whether that is relevant here.


-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products





More information about the Development mailing list