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

QItemDelegate does not allow editor widget to be placed transparently on top of painted display

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 4.8.0
    • 4.6.2
    • Widgets: Itemviews
    • None
    • Mac OS 10.6.3 Snow Leopard, Qt Creator 2.0beta
    • 18bb0125a246a0cfb4a1856e415624a25adb57ab

      The documentation for QAbstractItemDelegate::createEditor states that in order for an editor widget to be displayed with an opaque background one must specify setAutoFillBackground(false) on it. However, I can't seem to place an editor widget without it completely covering the custom display code I have in my ::paint method of the QItemDelegate. However, if I also maintain a call to QItemDelegate::paint(...) the default data (Qt::DisplayRole, Qt::DecorationRole) will be displayed with the widget opaquely.

      I have attached a sample project that implements a very simple QStringList based model that returns only a string for data, and a simple QItemDelegate. The expected behavior I believe is for the QPushButton editor widget to show on top of the display that is currently in each row, without seemingly painting a white background (or blue in this case for selection) behind it.

        1. TestItemView.tar.gz
          10 kB
          Matt Broadstone
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            mbroadst Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes