Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.0
-
None
Description
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); }