bmn
1st March 2016, 14:31
Hello,
I am currently trying to figure out how to structure my widget and probably need a little help. This is not about a detailed implementation.
I have data that needs to be displayed in a QTreeView. It contains two rows, and is 2 levels deep.
The second row should be able to contain a QLabel, QLineEdit, QCheckBox or a QComboBox.
invisibleRootItem
--> ParentItem1
--> Child 1 QCheckBox
--> Child 2 QLabel
--> Child 3 QLineEdit
....
--> ParentItem2
--> ParentItem3
However, I am not completely sure how to access individual items and the state of their 2 row (QCheckBox, QLineEdit...).
There will be about 100 QStandardItems in the Model, and it feels like storing a pointer to each one is not the solution.
So how can I clearly identify the individual QStandardItem within the model to set the parameters in the second row, or read their content?
Thank you in advance.
bmn
I am currently trying to figure out how to structure my widget and probably need a little help. This is not about a detailed implementation.
I have data that needs to be displayed in a QTreeView. It contains two rows, and is 2 levels deep.
The second row should be able to contain a QLabel, QLineEdit, QCheckBox or a QComboBox.
invisibleRootItem
--> ParentItem1
--> Child 1 QCheckBox
--> Child 2 QLabel
--> Child 3 QLineEdit
....
--> ParentItem2
--> ParentItem3
However, I am not completely sure how to access individual items and the state of their 2 row (QCheckBox, QLineEdit...).
There will be about 100 QStandardItems in the Model, and it feels like storing a pointer to each one is not the solution.
So how can I clearly identify the individual QStandardItem within the model to set the parameters in the second row, or read their content?
Thank you in advance.
bmn