HierarchicalHeaderView

Qt Widgets

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

5
Score 70.0%
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

8 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

8 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

8 years ago

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

Report

benjello

7 years ago

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

Report

C

Barmaglodd

7 years ago

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

Report

C

Barmaglodd

8 years ago

Great!

Report

conan2011

8 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

8 years ago

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

Report

yanbellavance

8 years ago

seen it on one of NASA's GUI

Report

conan2011

8 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

ad5xj

9 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

9 years ago

Thank you :)

Report

quiesadev

9 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

9 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

10 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

10 years ago

sorry for double post, please delete these two.

Report

chmod700

10 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

10 years ago

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

Report

chmod700

10 years ago

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

Report

C

Barmaglodd

10 years ago

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

Report

C

Barmaglodd

10 years ago

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

Report

ChrisW67

10 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

10 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

10 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

10 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.

12345678910
16
product-maker zhanfeifei May 23 2017 3 bad
product-maker MarkoSiroki Aug 21 2014 9 excellent
product-maker DPB1956 Jul 22 2013 9 excellent
product-maker pashok Dec 15 2011 9 excellent
product-maker smitt64 Nov 04 2011 9 excellent
product-maker FAntasyOR Apr 18 2011 9 excellent
product-maker VictorK Mar 03 2011 9 excellent
product-maker Base: 4 x 5.0 Ratings
alexeypertcev
Apr 05 2012
smitt64
Nov 04 2011
yanbellavance
Jun 17 2011
conan2011
May 06 2011
lit-uriy
Dec 23 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
1.3.3
updated Feb 10 2011
added Apr 20 2009
downloads 24h
2
mediaviews 24h 0
pageviews 24h 7
System Tags