QTabbar Missed Style
-
Can't anyone help me ?
-
@CodeFreaks
Hi. i did try your code but could not spot why style would draw in
old orientation.
I will have a look again this evening. -
@CodeFreaks
Hi
On second try i realized the odd rectangle came from stylesheet
tabWidget->setStyleSheet("QTabBar::tab:selected { background: rgba(28,28,29) ; font-size: 14px; font-family: 'Times New Roman' ; height: 120px; width: 30px; }");the last height and width is what makes it look wrong.
If you remove them it colors the area correctly.
tabWidget->setStyleSheet("QTabBar::tab:selected { color:white; background: rgba(28,28,29) ; font-size: 14px; font-family: 'Times New Roman'; }"); -
@CodeFreaks
Hi can you show how your style sheet looks with borders?
Often is sheet is ignored its due to errors.Since you already have a Delegate we could just draw some border :)
Maybe its CE_TabBarTabShape that should have it. not looked into it.I assume you try to have teh current tab have a border ?
-
@mrjj
Thanks for reply.
Widget with borders definition in stylesheet statement:
I applied the borders to all tabs.
tabWidget->setStyleSheet("QTabBar::tab { font-size: 14px; font-family: \"Times New Roman\" ;" " border-width: 1px;" " border-style: solid;" " border-color: black; }"
-
Hi
well good news is that it does support it
update:
Ok, when there is delegate it NOT drawn.
wrong :) I was stupid :)
it does work with delegate -
using stylesheet
tabWidget->setStyleSheet(QLatin1String("QTabBar::tab { \n" " border-width: 1px;\n" " border-style: solid;\n" " border-color: blue;\n" "}\n" "\n" "QTabBar::tab:selected { \n" "color:white; \n" "background: rgba(28,28,29) ; \n" "font-size: 14px; font-family: Times New Roman\n" "}"));
-
@CodeFreaks said in QTabbar Missed Style:
it missed the custom style:
Im not sure what you refer to here ?
update: ah sorry. tired.
You mean it no longer flips the tabs. -
@CodeFreaks
Hmm. very odd. it does seems like adding border makes the delegate not work
as expected. Sadly i have no idea why. -
Hi,
Yes, you can. But before that, did you already check that issue with the latest version of Qt ? It not please, do, that will help narrowing where developers should take a look. And please provide a minimal compilable example on the issue explaining when the issue appears and when not.
-
Hi
I tested with 5.11.1
BUT.
Some combinations does work.
So Im not sure its a actual bug more like the need to specify more keys.Damn it was a hard tired Sunday. they still not flipped. so not working.
-
Then it might be considered a documentation bug.
-
@SGaist said in QTabbar Missed Style:
Then it might be considered a documentation bug.
It might be something like this one: https://codereview.qt-project.org/#/c/238575/2//ALL
So please provide a proper bug report :)