Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-152

Subclasses of QStyledItemDelegate cannot get correct behaviour from superclass paint()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 1.1.2
    • PySide
    • None
    • Tested on Windows 7, Python 2.7.3

    Description

      Add a custom delegate to a styled view such as a QTreeWidget. If the custom delegate paint method passes its parameters on to QStyledItemDelegate.paint we would expect the original paint behaviour. In fact, we get a non-styled version of paint and cannot access the original styled painting action other than by recreating from scratch.

      Example included creates a QTreeWidget and adds a delegate to column 1. The delegate does nothing - it just forwards paints to the superclass. But it messes up the highlighting on column 1. The superclass call behaves like QItemDelegate instead of QStyledItemDelegate.

      I don't know why this happens but it may be related to the bug in PySide-115.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            bstrulo Ben Strulo
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes