Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119055

QColorDialog with QColorDialog::DontUseNativeDialog still queries dialog from platformtheme

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.6
    • None
    • Fedora 39, KDE Plasma

      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            nicolasfella Nicolas Fella
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes