Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6
-
None
-
Fedora 39, KDE Plasma
Description
When doing
auto dialog = new QColorDialog;
dialog->setOption(QColorDialog::DontUseNativeDialog);
the platformtheme is still queried for a color dialog helper.
This is a problem for me for the following reason:
In the plasma-integration QPT we don't implement color dialogs (and many other dialogs) because the default widgets-based ones are sufficient. This was working fine with Qt5.
Qt6 then introduced a QML default implementation of the QML ColorDialog component. That implementation is insufficient for desktop use cases, to the point where it's completely unusable for some of our use cases, see e.g. https://bugs.kde.org/show_bug.cgi?id=476509
To work around this I tried to implement color dialogs in plasma-integration by creating a QColorDialog (with the DontUseNativeDialog to prevent infinite recursion). This worked fine for font dialogs (see https://invent.kde.org/plasma/plasma-integration/-/merge_requests/115), but for color dialogs I still get infinite recursion. This happens because QColorDialogPrivate::init() calls platformColorDialogHelper() before I get a chance to set DontUseNativeDialog