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
3
votes
0 answers

FIXED: QTreeWidget change the branch hover style when hovering over an item

Im working on a project (big and complex) that i have to re-style using CSS and c++. For this project there is a custom QTreeWidget that must look like this: The question is, how i can change the hover background color of the "arrow"/ indicator,…
3
votes
2 answers

QTreeWidget catch item editing finished with no text change

I'm developing a Qt application with QTreeWidget on Qt Designer form. User can press add-new-item button and new item will appear with default name, after that user must enter item's name. So this is my code: void…
serg.v.gusev
  • 451
  • 3
  • 11
3
votes
0 answers

highlighting items of treewidget on mouseover

I do have an app with a treeWidget supporting Drag n Drop. I'm trying to highlight an item during the drag'n drop action. When dragging a file and before dropping it, I would like to highlight the destination item. void…
Seb
  • 2,365
  • 3
  • 20
  • 41
3
votes
1 answer

How to remove an icon in a QTreeWidgetItem?

I have a QTreeWidget with QTreeWidgetItems and sometimes the items have an icon. So I set the icon using: self.setIcon(0, icon) But how do I remove that icon again? self.setIcon(0, None) gives TypeError: 'PySide.QtGui.QTreeWidgetItem.setIcon'…
Goswin von Brederlow
  • 4,639
  • 13
  • 30
3
votes
3 answers

Remove space from QLabel in a QTreeWidget

I've added QLabel widgets to my QTreeWidget to work around the word wrapping issue in QTreeWidget. (see how to word wrap a QTreeWidgetItem). The QLabel widgets appear to have spacing around the text which for some reason disappears when the text…
Jason
  • 863
  • 10
  • 28
3
votes
2 answers

Using QTreeWidgetItemIterator in PyQT4 to return isChecked from QTreeWidget as a dictionary (or...something)

Check the edit for final code! So...I'll admit that I'm drawing an absolute blank here due to lack of knowledget and will just present my code and pray a little bit. Using this fantastic xml to QTreeWidget generator that ekhumoro coded I've added in…
Amdingo
  • 100
  • 1
  • 8
3
votes
1 answer

QTreeWidgetItem display html

I would like to have a QTreeWidgetItem display formatted html.(PyQt) Has anyone successfully managed this? htmlString = r"BoldText:SomeValue" item = QtGui.QTreeWidgetItem( item, [htmlString], 0) Any help greatly appreciated!
tranimatronic
  • 171
  • 1
  • 5
3
votes
1 answer

QTreeWdiget adding child element at specific location

I am trying to build a tree in a way that I can insert the element where I want. This is my tree in its initial stage: +Project +--Version 1.0 +--Version 2.0 Now, let's suppose I made a Version 1.1 and I would like to add it at the location…
Ferenc Deak
  • 30,889
  • 14
  • 82
  • 151
3
votes
1 answer

Formatted text in QTreeWidgetItem

I need to create QTreeWidgetItems which have support for formatted texts, such as: MyCreatedType - INTEGER(1) (ie: the line above should have a "normal" part : MyCreatedType and a "formatted" part (INTEGER(1) in our case). Any idea how to accomplish…
Ferenc Deak
  • 30,889
  • 14
  • 82
  • 151
2
votes
1 answer

QTreeWidget Passing multiple Items (more then one selection) through a function

I am a student programmer using Qt to build a GUI for work. I have ran into an issue; more or less and inconvience of sorts wiith multiple selections in the QTreeWidget. My GUI has a main interface with a QTreeWidget as the central item in this…
Wylie Coyote SG.
  • 919
  • 5
  • 19
  • 37
2
votes
1 answer

QTreeWidget::currentItem What returns when there is nothing selected?

I am a student programmer using Qt to develop a GUI application. I am using a QTreeWidget to display some properties stored in a vector. In the same window I have the buttons edit, copy, and delete. So far the buttons work to do what they need to;…
Wylie Coyote SG.
  • 919
  • 5
  • 19
  • 37
2
votes
2 answers

qt 4.7 removeChild() and memory

Im writing a c++ qt application. In one part I'm creating a QTreeWidget. The user has all possibilities to create and delete entries in that tree. So when the user creates a item he will call a function which then itself calls: QTreeWidgetItem*…
Donny
  • 499
  • 1
  • 8
  • 24
2
votes
1 answer

Editing QTreeWidgetItem while retaining file extension

I have a QListWidget that contains filenames. Right-clicking on an item brings up a menu which contains a Rename... item. Clicking on Rename... lets the user edit the filename. So far so good. But in the Qt Creator Projects window, right-clicking on…
TonyK
  • 15,585
  • 4
  • 29
  • 65
2
votes
1 answer

Drag and Drop Data among multiple QTreeWidget

I have a number of QTreeWidget. Here, there are two trees. the left one has "a" , "b". I want to drag this item into the right tree. I have no error but the item become empty. How should I do for dragging the left data to the right tree? and…
Haru
  • 1,491
  • 1
  • 9
  • 23
2
votes
2 answers

How to set a string property to QTreeWidgetItem?

I have a list of application specific items uniquely identified by an id. Their names are displayed in a QTreeWidget (one item corresponds to a single QTreeWidgetItem). I would like to somehow attach the corresponding ids to these QTreeWidgetItems…
pseudomarvin
  • 867
  • 2
  • 10
  • 23
1
2
3
13 14