[Development] Can QImage format plugins require QGuiApplication?
giuseppe.dangelo at kdab.com
Tue Apr 14 11:34:07 CEST 2020
On 4/14/20 11:30 AM, Allan Sandfeld Jensen wrote:
> > No, any GUI-related API requires QGuiApplication, and any widget-related
> > API QApplication.
> In theory, but see https://codereview.qt-project.org/c/qt/qtbase/+/47846
I would stick to the documented contract, without any fancy ad-hoc
workarounds that work today and may get broken tomorrow. Case in point,
image plugins have the right of happily start loading fonts, accessing
the clipboard, querying the screen DPI and whatnot. Any breakage caused
by this because of a lack of a QGuiApplication instance is a bug in
application code, not Qt.
My 2 c,
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
More information about the Development