2 Attachment(s)
QTabBar stylesheet references (changing base color)
Hello,
first time i post here, nice to meet you everyone.
I am working on a MDI, and I use a QTabBar to switch between documents.
I want to change the style of the tabbar, and I use stylesheets for that.
Customisation of the tabs is not a problem, but I can't find the subcontrol or the property to change the color of the bar at the bottom of the tabbar widget.
What I currently have :
Attachment 6121
What I want to do :
Attachment 6120
Re: QTabBar stylesheet references (changing base color)
hmm.. I'd try QTabWidget ::pane :top or something along these lines.
Re: QTabBar stylesheet references (changing base color)
Quote:
Originally Posted by
high_flyer
hmm.. I'd try
QTabWidget ::pane :top or something along these lines.
I did try many things like that w/o success ... but it's like an errand, i don't find many infos on the subject.
Isn't there an exhaustive list of sub-controls and parameters for all QT classes ?
(At least for QTabBar atm ;) )
Re: QTabBar stylesheet references (changing base color)
Quote:
Isn't there an exhaustive list of sub-controls and parameters for all QT classes ?
Sure there is:
http://doc.qt.nokia.com/latest/style...reference.html
But I still find it not always quite clear what is what, so I just try.
Re: QTabBar stylesheet references (changing base color)
Quote:
Originally Posted by
high_flyer
Yeah I know this link, but it is not exhaustive, I am not sure there is all the subcontrols for each class. It seems that it shows the most ofently used ones.
I am trying to find the properties that interest me in the QTDesigner, I'll put here what i find. (I must yet find how to add a QTabBar in QTDesigner, I only see Tab Widget lol).
Re: QTabBar stylesheet references (changing base color)
Quote:
ut it is not exhaustive, I am not sure there is all the subcontrols for each class.
AFAIK this is the best you can get, and it does list everything - after all, this is the official Qt Style sheet reference.
If there are things not documented, its because they are not supposed to be used.
But post if you find the answer to your question, so others may be helped by it.
Re: QTabBar stylesheet references (changing base color)
Quote:
Originally Posted by
high_flyer
AFAIK this is the best you can get
I am affraid it is ...
I'll post what i find here, but I can't insert a QTabBar in the designer ... thx for the help anyway
Re: QTabBar stylesheet references (changing base color)
Quote:
but I can't insert a QTabBar in the designer
but you can A QTabWidget which has a QTabBar.
Re: QTabBar stylesheet references (changing base color)
yes, but with a QTabWidget I can't find the parameters of the QTabBar.
Re: QTabBar stylesheet references (changing base color)
Not sure what you mean - but you can set a stylesheet, and reference in it QTabBar and all its sub components and see the changes on the fly.
Re: QTabBar stylesheet references (changing base color)
Ok ... sorry for the trouble, a colleague did a "drawrect" kinda hided in the code, and I had to deactivate all the widget one by one to find what it was ...
Re: QTabBar stylesheet references (changing base color)
Can you show the stylesheet for styling the line you wanted?
Re: QTabBar stylesheet references (changing base color)
It was a dumb rect. I'm deactivating it.
I think the best solution is to play with the bottom margin or border of my QDockWidget.
I'll post the stylesheet when i'm done.
Re: QTabBar stylesheet references (changing base color)
Ok, I couldn't solve this with stylesheet.
In fact there is a gap in the QMainWindow between the Docks Widgets and the Central Widgets, I couldn't manage to reduce it, so I did it drawing a rec behing the widgets ... sounds crap to me, but I hope I will find a better solution later.