Skip to main content

Questions tagged [qtreeview]

QTreeView is a class in Qt framework. It provides a default model/view implementation of a tree view.

qtreeview
0 votes
0 answers
44 views

Custom QAbstractItemModel or QAbstractItemView like explorer

I've been experimenting with the model view concept in qt and c++ for some time now. My goal is to present the data in a table like Windows file explorer can do... There is no problem with tabular ...
exo's user avatar
  • 385
1 vote
3 answers
43 views

Prevent root items from being dropped onto another root item in PyQt5 QTreeView

I'm working on a PyQt5 application where I have a QTreeView populated with a QStandardItemModel. The root items present documents and the child sections within the document. So they should not be ...
Mazze's user avatar
  • 433
1 vote
1 answer
59 views

Why is this QAbstractItemModel based model not working?

I create a simple QMainWindow app as follows: The header file: //mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QAbstractItemModel> #include <QTreeView> #include <...
William's user avatar
  • 948
-1 votes
0 answers
23 views

Obtain full details about available default hotkeys on QTreeView?

There are a couple of ways of implementing new hotkey functionality. But I'm just wondering if there is any way to find out what's there out of the box. Maybe somewhere in the source code? I looked ...
mike rodent's user avatar
  • 15.1k
0 votes
0 answers
27 views

PyQt6 TreeWidget not importing colors from ui fil

I am trying to set the individual colors of each line in a QtreeWidget, I have tried setting them manually as I fill the treeView with .setForeground(col, QBrush(QColor(R, G, B, a))) and without the ...
Marshall Haynes's user avatar
0 votes
1 answer
52 views

What should I do to use a QTreeView child to select a subset of data in a model to show it in a QTableView?

Here I'm trying to create an Qt model/view that shows different subsets of data in a table view from a model depending of the child selected/clicked in the QTreeView, but I'm new at this and the ...
Vil's user avatar
  • 1
0 votes
1 answer
94 views

Displaying data in different widgets: PySide6

My question is what would be the most efficient way to display an object (in my case Project class) attributes in different widgets? I read that there are proxy models, but I couldn't figure out if it ...
user16613865's user avatar
0 votes
1 answer
54 views

Python Qt6 Updating Model Based on View Edits

I am attempting to create a mvc app that can take a JSON file, make a TreeView from it, allow the user to make edits, then save the edits to a JSON file. I am having trouble understanding how to ...
Pleasant Gopher's user avatar
0 votes
1 answer
67 views

Qt6: Disable drawing of default background for QTreeView items

Prior to Qt 6.5 background for items was rendered only when alternating background for items was specified, allowing QStyledItemDelegate to render background independently. This however was changed by ...
kadet's user avatar
  • 94
0 votes
2 answers
38 views

Prepend a main row counter as first column/text to QTreeView in PyQt5?

The example code below generates a GUI like this: What I would like, is to prepend a row count before the main entries only (a, b and c in the image), as shown on the manually edited image: How can ...
sdbbs's user avatar
  • 5,121
0 votes
1 answer
18 views

QTreeView with reorderable elements, but elements should nstay in the same parent folder

i am using PyQt6. I want to have a QTreeview with reorderable Elements. But the elements shuld only be moved in the same hierarchy deep than it was, like in this picture, Item 'A1' should only be ...
Lukas Fürst's user avatar
0 votes
0 answers
52 views

I am encountering issues on making a custom file browser with PyQt5 using QTreeView, QStandardItemModel and QStandardItem: my program randomly crashes

I am here to ask your help as my last hope to get out of this hell. Just to be clear, I am not here for reading comments like: there is a builtin in PyQt for what you are doing etc... I know it, its ...
MRCSTD's user avatar
  • 1
0 votes
1 answer
27 views

displaying several treeviews one below the other

I have a project that consists in displaying a datamodel using qtreeview from a folder that contains several files. I displayed a treeview of a single file but i couldn't display several treeviews one ...
roua mallek's user avatar
0 votes
1 answer
85 views

How can I append directories with many subdirectories to a QTree from a list of paths?

The function I am using works, but not as I would like it to. With each new entry from the list of paths, it adds a new line in the tree instead of appending it to the previous one if the path is ...
user avatar
0 votes
0 answers
34 views

Vertical scroll bar of Qtreeview is not proportional to the size of the content

When you tested Qtreeview in the application below, the vertical scrollbar normally works proportional to the content. class MyTreeView(QtWidgets.QWidget): def __init__(self): super()....
Danilo Silva's user avatar

15 30 50 per page
1
2 3 4 5
55