Questions tagged [qtreewidgetitem]

The QTreeWidgetItem class, part of the Qt framework, provides an item for use with the QTreeWidget class.

Documentation can be found here (Qt4) and here (Qt5).

205 questions
0
votes
1 answer

How to share data with a TreeView such as done by gtk_list_store

I do managing an app with a TreeView in Qt/C++ In order to not mix File system access and window/UI management, I do have a create a C++ code which manage to interact with the FileSystem and a C++ class which is in charge of displaying the Tree I…
Seb
  • 2,365
  • 3
  • 20
  • 41
0
votes
2 answers

How to get the new value of a qtreewidgetitem after entering new value

I have created a treewidget and I have added some treewidgetitems which is editable. My goal is now to catch the new value of the item after entering it. Here is the code: QTreeWidgetItem* child = new QTreeWidgetItem(); child->setText(0,…
Seb
  • 2,365
  • 3
  • 20
  • 41
0
votes
1 answer

QList statement

I'm working with with QTreeViewItem and also QList. What I'm doing in my C++/Qt app is to build a TreeView with multiple elements inside. When clicking on a dedicated action, I'm checking which item of my tree view is selected and get the item…
Seb
  • 2,365
  • 3
  • 20
  • 41
0
votes
1 answer

QTreeWidget Expanding individual Items from memory in C++

I have a Qt QTreeWidget and I am trying to save the state of which header items were expanded so that when I refresh my tree with new information it can re expand the items that were previously expanded. Each time an itemExpanded or itemCollapsed…
silverzx
  • 1,119
  • 4
  • 13
  • 18
0
votes
2 answers

QTreeWidget insertTopLevelItem - index given not accurately displayed in Tree?

I am unable to properly insert a QTreeWidgetItem at a specific index, in this case I am removing all QTreeWidgetItems from the tree, doing a custom sort on their Date Objects and then inserting them back into the QTreeWidget. However, upon…
crackerbunny
  • 139
  • 3
  • 12
0
votes
2 answers

How to make a subchild to a child in QTreeWidget?

I want to make it so that I can expand a third level (subchild) to a child under the top level item (root). All I've been able to do is make multiple children to a single root. this is in my .cpp QStringList string1, string2; …
EricaAKrause
  • 11
  • 1
  • 2
0
votes
1 answer

Multiple file insert in QTreewidget using Drag and Drop events

I am working in Qt4.7 on MAC OSx. I want to insert files in QTreewidget using the Drag and Drop events. I want to add multiple files at a time. I am using this: void MainWindow::dragEnterEvent(QDragEnterEvent * e) { …
Ashish
  • 209
  • 1
  • 3
  • 21
0
votes
1 answer

get qtreewidgetitemiterator values

I am able to display data in a qtreewidget form. While reading values ( and after googling ), I find qTreeWidgetItemIterator as a way to iterate through all the items. iterator = QTreeWidgetItemIterator(self.light_write, QTreeWidgetItemIterator.All)…
0
votes
1 answer

multiple setting qtreewidgetiitem checksatate not working

i have a qtreewidget with checkable items, i want to change state to be checked or not base on some value, first time i create toplevelitems i set item to be unchecked and it works, but after that when i want to checked it inside code it get checked…
mari
  • 367
  • 1
  • 4
  • 19
0
votes
0 answers

setting checkstate for qtreewidgetitem not working

i have a qtreewidget with checkable item, base on a value i want to check toplevelitem number 0, i used setcheckstate(Qt::checked), after that i checked it in if clause whether it's checked or not, and i get it is checked, but checkbox is not ticked…
mari
  • 367
  • 1
  • 4
  • 19
0
votes
2 answers

QTreewidget only displays first letter of item name

Im learning how to use QTreeWidget and Im stuck adding new items to it. The QTreewidget itself is created with qtdesigner, so my idea was just to add items. eg: tw = self.ui.treeWidget item =…
Hubschr
  • 1,095
  • 4
  • 16
  • 31
0
votes
0 answers

QTreewidget scrolling gets slowdown in case of multiple files

I am using QTreewidget in my application. I am filling this QTreewidget on runtime with some files addresses. Now my problem is when there are excess number of files(more than 200) the scrolling gets slow down in the QTreewidget which creates…
Ashish
  • 209
  • 1
  • 3
  • 21
0
votes
2 answers

Creating GUI with PySide

I have some Python command line tools ready. So now I am trying to create a GUI so that with one click, I can execute the tool. I am trying out Pyside and creating a QTreewidget at the moment. I am inputting the items one by one on QT designer.…
dorothy
  • 1,103
  • 4
  • 17
  • 33
0
votes
1 answer

Qt QTreeWidget how to get the row a QComboBox is on

I have a QTreeWidget with several QComboBoxes as QTreeWidgetItems. I am trying to find a way to get the current QTreeWidget row of the selected QComboBox. ui->sensorTree is the QTreeWidget. My tree looks something like this: parent0 child0 …
Jared Price
  • 4,489
  • 7
  • 40
  • 70
0
votes
1 answer

Retrieve QTreeWidgetItem object at drop event Pyside

I'm writing a program where I need data from the QTreeWidgetItem that has been dropped into another part of my QTreeWidget. The drag and drop is working perfectly, and I am able to get a QEvent.Drop type event in my eventFilter. But I cant get the…
Yvo Götz
  • 15
  • 1
  • 3
1 2 3
13
14