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

QItemDelegate::drawDecoration documentation not complete

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • Some future release
    • 4.4.2
    • Documentation
    • None

    Description

      the description for this function says "Renders the decoration pixmap within the rectangle specified by rect using the given painter and style option." However, this is only done if there is no icon stored temporarily; the code is:

      // if we have an icon, we ignore the pixmap
      if (!d->tmp.icon.isNull())

      { d->tmp.icon.paint(painter, rect, option.decorationAlignment, d->tmp.mode, d->tmp.state); return; }

      // (otherwise draw the pixmap)

      That icon is there if the role of the index in the paint method is Qt::DecorationRole; this should also be mentioned in the documentation.

      Attachments

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

        Activity

          People

            boddie David Boddie (Inactive)
            phartman Peter Hartmann (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes