[Development] Can QImage format plugins require QGuiApplication?

Giuseppe D'Angelo 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...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200414/8969d168/attachment.bin>


More information about the Development mailing list