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

Strange behavior of QColorDialog, when called from QStyledItemDelegate subclass

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • 5.8.0, 5.10.0
    • Widgets: Itemviews
    • None
    • openSUSE 13.2, 42.1, 42.2 (42.2 with KDE:Qt5 repo)
       KDE 4+5
       Qt 5.10.0

      Running the attached C++ example shows a strange behavior on KDE desktops: double clicking on an item opens a QColorDialog. Attempting to move the dialog before selecting a color makes the dialog disappear with Qt 5.8.0, while older versions (tested with 5.5.1) doesn't show this behavior. Further examinations indicate, that other platforms might not be affected.

      This is the simplest C++ version, I can come up with. It is based on PyQt scripts, that I've published on stackoverflow:
      http://stackoverflow.com/questions/43298605/strange-behavior-of-qcolordialog-when-called-from-qstyleditemdelegate-subclass

      This (related, slightly more complex) script even segfaults after closing the QColorDialog:
      http://stackoverflow.com/questions/43299616/calling-qcolordialog-triggered-from-qstyleditemdelegate-editor-results-in-crash

      Inquiry on PyQt ML:
      https://www.riverbankcomputing.com/pipermail/pyqt/2017-April/039059.html

        1. qtbug60094.zip
          3 kB
        2. qtbug60094_pyside2.py
          3 kB
        3. mplexitemdelegates.py
          14 kB
        4. itemdelegate.tar.gz
          3 kB
        5. itemdelegate.py
          3 kB
        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
            hpj Hans-Peter Jansen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes