HierarchicalHeaderView
Qt Widgets
Score 67%
Description:

Hierarchical header view for QTableView.
Header data is described by QAbstractItemModel. Text in cells of header can be rotated.
Last changelog:

8 years ago

Version 1.3.3
- Optimized painting of rotated text.
Version 1.3.2
- Fixed wrong painting of selected and highlighted sections.
Version 1.3.1
- Fix bug: vertical size is always same as horizontal size.
Version 1.3
- Fix bug with extra column on first show of table view.
- New example: proxy model. It allows using HierarchicalHeaderView without subclassing QAbstractItemModel.
Version 1.2
- Fix potential crash after setModel call.
- Force header size recalculation. This fix some bugs with header size after setModel call.
Version 1.1
- Vertical header support.
Version 1.0.
- Initial release.

C

Barmaglodd

6 years ago

I have tested setClickable(true) on Debian testing, Qt 4.7.3, works fine. May be you did any other modifications?

Report

galoag

6 years ago

Thanks for your effort, had to be some mistake in my code, after some rewriting it works totally fine (don't exactly know what introduced the issue).

Report

CrMosk

6 years ago

http://dl.dropbox.com/u/3070843/HierarchicalHeaderView_on_Python32.zip

Report

C

Barmaglodd

6 years ago

Great!

Report

benjello

5 years ago

Is it possible to have a python 2.7 version of this fantastic view ?

Report

C

Barmaglodd

5 years ago

I am not Python coder, so try to ask CrMosk or port his work yourself.

Report

conan2011

6 years ago

nice toy :D
a little inspiration:
the next step on the way to perfection could be showing of a column- and rowdescription, like a header for the header:
http://s7.directupload.net/file/d/2516/vh84qszu_png.htm

greedings and *thumbsup*

Report

C

Barmaglodd

6 years ago

I have never seen this feature before. Have you a real use case?

Report

conan2011

6 years ago

yes i have: it's called "pivot table"

for example used in microsoft excel:
http://www.mrexcel.com/articles/fill-pivot-blank-cells.php

...and in other applications
greedings

Report

yanbellavance

6 years ago

seen it on one of NASA's GUI

Report

ad5xj

7 years ago

Qt has needed an answer for the MSVB/VC hierarchical table widget and this makes a giant leap toward being there.

Report

C

Barmaglodd

7 years ago

Thank you :)

Report

quiesadev

7 years ago

Hi! I've playing a little with the examples and I've found that columns and rows can't be selected.

Is it a matter of the examples or an issue on the widget??

Thank you for your job!

Report

C

Barmaglodd

7 years ago

You can select rows and columns using setClikcable and setHighlightSections methods of HeaderView, but highlighting is buggy. I'll fix it in some days.

Report

chmod700

8 years ago

Great work on this code, and thank you for sharing it.

After creating a cell if you set its BackgroundRole to say QBrush(Qt::red) the background color never changes.

You can see this simply by compiling example2 and calling

cell->setData(QBrush(Qt::red), Qt::BackgroundRole);

on the cell object that is created.

Report

chmod700

8 years ago

sorry for double post, please delete these two.

Report

chmod700

8 years ago

Great work on this code, and thank you for sharing it.

After creating a cell if you set its BackgroundRole to say QBrush(Qt::red) the background color never changes.

You can see this simply by compiling example2 and calling

cell->setData(QBrush(Qt::red), Qt::BackgroundRole);

on the cell object that is created.

Report

C

Barmaglodd

8 years ago

It works to me. May be your style does not respect palette settings. What style do you use?

Report

chmod700

8 years ago

I'm trying on Windows 7 and did not override any default styles. Do certain styles prevent palette editing?

Report

C

Barmaglodd

8 years ago

I don't know. Try to run example2 from command line with -style windows.

Report

C

Barmaglodd

8 years ago

AFAIK, Windows 7 is supported only in qt 4.6, try it.

Report

ChrisW67

8 years ago

Thanks for the inspiration. I was looking for an example of how to do something similar... your code provided that.

Do you have any thoughts on how drag-and-drop reordering of the headers can be achieved? Currently setting setMovable() is not pretty. I was thinking of being able to reorder level 1 entries and having all subordinate entries follow. Reordering level n entries can be done within their parent at level n-1.

Report

C

Barmaglodd

8 years ago

I have never used this feature, so it is not implemented. Sorry, but now i don't have mutch time for it. If you'll implement it, send me source code :) I think you had to add a proxy model to HierarchicalHeaderView for handling of custom column order. You also had to handle your self all drag'n'drop mashinery. It is pretty big piece of code :(

Report

rucore

8 years ago

pretty looking widget :)

It would be nice to see the feature for creation hierarchial vertical header as well as horizontal.

Report

C

Barmaglodd

8 years ago

Thanks.
I'll implement this feature in next version.

Report

8 years ago

Version 1.3.3
- Optimized painting of rotated text.
Version 1.3.2
- Fixed wrong painting of selected and highlighted sections.
Version 1.3.1
- Fix bug: vertical size is always same as horizontal size.
Version 1.3
- Fix bug with extra column on first show of table view.
- New example: proxy model. It allows using HierarchicalHeaderView without subclassing QAbstractItemModel.
Version 1.2
- Fix potential crash after setModel call.
- Force header size recalculation. This fix some bugs with header size after setModel call.
Version 1.1
- Vertical header support.
Version 1.0.
- Initial release.

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
1.3.3
updated Feb 10 2011
added Apr 20 2009
downloads today
0
page views today 8