[Development] QtQuick Dialogs Widgets fallback

Kai Uwe Broulik kde at privat.broulik.de
Tue Aug 22 22:16:41 CEST 2023


Hi everyone,

we found that the Qt Quick Dialogs (MessageDialog and friends) do not 
support a fallback to their widget counterpart like the ones from 
Qt.labs.platform did.

In KDE Plasma we do not provide a platform theme implementation for the 
message or color dialogs, as the Qt ones are “good enough”, thus we will 
get the QtQuick fallback which are a bit rough for use in a desktop 
application.

I understand and fully agree that the Qt Quick Dialogs module shouldn’t 
link QtWidgets, but is there a way we could support a fallback to 
QMessageBox, QColorDialog, etc, as the labs module did?

I found [1] which restructures the relevant styles into their own 
respective plug-in. Is it possible we add a QtQuick.Dialogs.Widgets 
import that then delegates to the relevant widgets, if there’s no 
platform-provided dialog? I don’t want to go down the rabbit hole of 
adding entire proper QFactory* for what is effectively a single 
conspicuous plug-in, so I wonder if we could piggyback on that 
infrastructure.

Cheers
Kai Uwe

[1] https://codereview.qt-project.org/c/qt/qtdeclarative/+/476748


More information about the Development mailing list