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

Edit of tree and list does not follow the QLineEdit style

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P2: Important P2: Important
    • None
    • 6.8.0
    • None
    • Windows

      The edit action to rename on tree and list does not follow the QLineEdit style.
      I had to add a padding to have the exact same result as QLineEdit:

      void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override
      {
          QStyleOptionViewItem itemOption = option;
          initStyleOption(&itemOption, index);
          
          QRect geom = QApplication::style()->subElementRect(QStyle::SE_ItemViewItemText, &itemOption, editor);
          geom.setTop(geom.top() - 4);
          geom.setBottom(geom.bottom() + 5);
          
          editor->setGeometry(geom);
      } 

        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
            alundra Michael Ségura
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes