Questions tagged [qitemdelegate]

QItemDelegate is a Qt class which provides display and editing facilities for data items from a model.

The QItemDelegate class is one of the Model/View Classes and is part of Qt's model/view framework.

QItemDelegate can be used to provide custom display features and editor widgets for item views based on QAbstractItemView subclasses. Using a delegate for this purpose allows the display and editing mechanisms to be customized and developed independently from the model and view.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

145 questions
0
votes
1 answer

Is it possible to show complex widget in QListView?

I want to create a customized widget which can show files in every drive in system. Here is the layout: Every row of QListView contains a title bar (QLabel) and a QListWidget which contains many icon to represent files. I know how to use…
Bruce Hsu
  • 43
  • 6
0
votes
0 answers

How to get the access of Qt::DecorationRole from the QItemDelegate?

I need to customize the combo box which contains the text in the format " a rectangular color palette followed by a text description". Iam using an a custom itemdelegate for a QComboBox . in the comboBox im checking the state of the Item and…
Bharathi
  • 337
  • 1
  • 5
  • 17
0
votes
1 answer

Qt5 C++: Set Spinbox Delegate For Specific Table Column

I'm trying to add a spinbox item delegate to a specific column in my table. After looking though the example in Qt I copied most of that code and implemented it but when I call setItemDelegateForColumn() my application crashes. The column index is…
Jarrod Cabalzar
  • 408
  • 1
  • 5
  • 24
0
votes
1 answer

When closing QItemdelegate editor shifts item to right

I have a QTableview and QItem delegate set to it, the editor is a QCombobox which I reimplemented, because I wanted to modify its keyPressEvent. because if I press down key when the qcombobox editor is open it selects the next row in the editor, but…
JoeMicro
  • 183
  • 1
  • 2
  • 13
0
votes
1 answer

How to set QTableView as a cell of QTableView

I have QTableView - mainTableView, in some cells of which I need to show another QTableView - cellTableView. Actually I found 2 ways: 1) Use pTableView->setIndexWidget 2) Use pTableView->openPersistentEditor and implement an ItemDelegate. I have…
Funt
  • 399
  • 8
  • 23
0
votes
2 answers

button delegate issue

I hope somebody could help me with this annoying issue I've been battling for a while. I have managed with the code attached to insert buttons in a tableview in a delegate column. The problem is that to press the button, I need to "activate" the…
user1028826
  • 71
  • 1
  • 8
0
votes
1 answer

QItemDelegate: painting an unwanted QCheckBox

I have an editable model, which inherits QAbstractTableModel. Also have a custom delegate to go with it. This is my first editable model, and I think I'm missing something. I'm pretty much following the examples found at Nokia. My model tells the…
kiss-o-matic
  • 1,111
  • 16
  • 32
-1
votes
1 answer

How to center QPixmap while Painting it inside QItemDelegate of QListWidget

I'm painting a QPixmap inside the QItemDelegate of QListWidget. Each QListWidgetItem is of different dimensions. Inside the void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) function of QItemDelegate, I…
-1
votes
3 answers

PyQt QTreeWidget problem with custom delegate

I'm trying to write simple property editor. I have automatically generated pyqt class (WorkZone in the code below), and I need to view/edit some of it's properties with PropertyEditor, with the delegate PropertyEditorDelegate, that uses custom…
Maxim Popravko
  • 4,100
  • 3
  • 29
  • 43
-2
votes
1 answer

Why there is no #include in my delegate.h file?

When i try to add a delegate file in my project, there is something wrong with my codes. I don't know why. My operations are as below. My operation MyDelegate.h And the tutorial is as following: #ifndef MYDELEGATE_H #define…
Hui Ding
  • 1
  • 1
1 2 3
9
10