View Full Version : Change HLine color
smtgra011
4th July 2007, 14:17
Hi, I'm trying to display a hierarchy and am using HLines and VLines to show relationship.
The only problem is that I can't seem to change their color.
Any help would be much appreciated.
Cheers
G
wysota
4th July 2007, 16:50
What kind of hierarchy? Maybe it'll be easier if you just paint all lines and text instead of using line widgets?
A QFrame with frame shape of QFrame::VLine or QFrame::HLine and frame shadow of QFrame::Plain draws the line with QPalette::WindowText:
QPalette palette = line->palette();
palette.setColor(QPalette::WindowText, Qt::red);
line->setPalette(p);
smtgra011
5th July 2007, 07:55
Legendary, thanks alot.
Cheers
G
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.