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

QStyledItemDelegate with QComboBox doesn't work on OS X

    XMLWordPrintable

Details

    • macOS

    Description

      This ComboBox delegate won't open the list of options when clicking on it instead it just changes cell focus. Issue can be seen at least on OS X.

      class ItemDelegate: public QStyledItemDelegate
      {
      public:

      ItemDelegate(QTreeWidget* parent)
      : QStyledItemDelegate(parent)
      {}

      QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
      {
      if (index.column() == 1)

      { QComboBox *pComboBox = new QComboBox(parent); pComboBox->addItem("Hello"); pComboBox->addItem("World"); return pComboBox; }

      return NULL;
      }
      }

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            kileppal Kimmo Leppälä
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes