PDA

View Full Version : QTabBar Triangular Rounded



Alundra
22nd March 2015, 05:02
Hi,
I'm using a QTabBar with a triangular shape, the only problem is I can't set the triangular shape as I would.
Here a screenshot of what I try to achieve more or less : https://mozorg.cdn.mozilla.net/media/img/firefox/new/browser-windows.b9cf0baa80e1.png
Here what I have using triangular shape : http://zupimages.net/up/15/12/5hin.png
What I would is having a more rounded shape.
Is it possible ? How achieve that ?
Thanks for the help

Henry Blue Heeler
23rd March 2015, 00:42
Your 5hin.png tabs are hardly triangular. Can you post some code? Likely you just need some stylesheet help.

Alundra
23rd March 2015, 02:06
You right, using border-top-right-radius gives a rounded corner :


QTabBar::tab:last
{
margin-right: 0px;
border-top-right-radius: 9px;
}

But, for the bottom rounded corner using a negative value doesn't do anything :


border-bottom-right-radius: -9px;

Using a positive value end to a rounded rectangle.
Maybe an image must be used to achieve this result.
There is no way to move the border bottom point to have a higher angle of the line ?
The real big problem of stylesheet with QTabWidget is explained there : http://www.qtcentre.org/threads/61967-QTabWidget-moving-tab-bug-using-stylesheet