qtreeview Questions
5
Solved
I am attempting to create a tree widget that will essentially allow the user to view various breakdowns of data and have the option to delete certain items. In order to do this I want to have check...
Loopy asked 10/7, 2015 at 13:38
4
Solved
I want to have a QTreeView without an indentation on the left side increasing at each nesting level. I tried setting QTreeView::setIndentation(0). It removes the indentations just as I want, howeve...
9
Solved
I'd like to be able to deselect items in my QTreeView by clicking in a part of the QTreeView with no items in, but I can't seem to find anyway of doing this. I'd intercept a click that's not on an ...
3
Solved
I was trying to insert a QCombobox only in some specific cells of my QTreeview. As I read, I think that I need to create my delegate (that I've created). But I don't understand how to insert this i...
3
I wanted to have a tree view which shows the item name, the item description, and two related Boolean values in respective columns. I started by modifying the Editable Tree Mode example, so there's...
Hesse asked 4/1, 2013 at 13:33
2
Solved
I was wondering how I can return the text value, and index of a selected item in a QTreeView. I tried using:
self.TreeView.selectedIndexes()
but that returns a QModelIndex. I'm not exactly sure ...
Malaria asked 3/12, 2017 at 17:20
6
Solved
Suppose my model has items with the following string for Qt::DisplayRole
<span>blah-blah <b>some text</b> other blah</span>
I want QTreeView (actually, any item view) to ...
2
Solved
I have a class inheriting from QTreeView. I need to assign icons to different types of files and directories. There is this solution given from this question:
QVariant MyQFileSystemModel::data( co...
5
Solved
In PyQt, I am looking for a way to set the height of rows in a QTreeView (similarly to QTableView.setRowHeight(row, row_height), but QTreeView does not have this function). QAbstractItemModel is us...
2
Solved
I have a QTreeView and I want to expand all child items of a recently expanded item.
I tried using .expandAll(), but it expand all others items also.
I'm having a hard time to get the ModelIndex...
1
I set QFileSystemModel root path and then set it as QTreeView model, but if I try to find index of a speciffic file it is giving me D:
I am sure the file is there !
self.model = QtWidgets.QFileSys...
Coatbridge asked 25/7, 2019 at 3:9
3
Solved
8
Solved
What I have:
QTreeView class with table data
And connected QAbstractTableModel model
Question: how to save expanded state of items? Is some one have finished solutions?
PS: I know, that I can...
3
Solved
I'm attempting to create a QTreeView and use a custom model for it. I have placed qDebug() statements at various places, and I have determined that data() is never being called. How can I fix this ...
Elliotelliott asked 23/7, 2011 at 16:36
1
Solved
I'm implementing a Qt based tree view, where the view is a QTreeView-based class and the model is a QAbstractItemModel-based class. The tree is supposed to have millions of nodes in it. I'm impleme...
Schizogenesis asked 21/12, 2017 at 6:7
1
Solved
I have two questions:
I was wondering if this is the proper way to do a search/filter on a single column treeview. I feel like a lot of my copying/pasting could contain unnecessary stuff. Is all ...
Artist asked 11/12, 2017 at 3:49
1
Solved
I subclassed a QTreeView and I have two columns where there are checkboxes. I would like to set two different images: one for the first column, and another one for the second column. I know I can c...
5
I've a problem with QTreeView horizontal scrollbar, it doesn't appear. I've set horizontal scrollbar policy to ScrollBarAsNeeded, but it doesn't appear if needed. Have tried to connect expanded and...
Immoderacy asked 8/7, 2011 at 13:33
2
Solved
How can I trigger the changing of an icon when the user clicks the Icon only for the items/rows in the list which are of type File. Each row in the treeview contains an object in the UserRole calle...
2
Solved
I want to have my QTreeView always expanded all of the items. In that case, all expand button / decoration are unnecessary and I want get rid of them. How can I delete all of them? setRootIsDecorat...
3
I have a QTreeView and want different background colors for rows, depending on their content. To achieve this, I derived a class MyTreeView from QTreeView and implemented the paint method as follow...
Siderite asked 10/1, 2013 at 10:4
1
Solved
How can I collect all Qtreeview items so i can then iterate over them and apply necessary changes like display text updates, or color changes?
Is there an easy way to collect all of them using the...
2
I am trying to connect to the selectionChanged signal of a QTreeView using PyQt. I have done this in the past (for a QTableView) and was successful. But now I cannot get similar code to work.
In t...
Bel asked 11/11, 2010 at 22:58
4
Solved
I have a model
class TreeModel : public QAbstractItemModel
which I populate with instances of my TreeItem excluding column==1. In column 1 I've created CheckBoxes:
QVariant TreeModel::data(cons...
Absurd asked 22/7, 2013 at 11:10
4
Solved
I'm using Python 2.7 and Qt designer and I'm new to MVC:
I have a View completed within Qt to give me a directory tree list, and the controller in place to run things. My question is:
Given a Qtre...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.