-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.12
-
None
Currently (Qt 5.12) QTabBar can elide long text in tab header with ...
It would be nice if it can fade-out the long text as Google Chrome do it with its tabs
This stylesheet does similar what I want, but
- it applied to all tabs
- I have to truncate long text on my own
We need this to improve Kiwix - offline web browser, which initially was designed to read Wikipedia offline.
The original issue:
https://github.com/kiwix/kiwix-desktop/issues/358
We can apply stylesheet to tabs:
tabWidget->setStyleSheet( "QTabBar::tab {" " color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," " stop: 0.8 #2A2A2A, stop: 1.0 #E1E1E1); }");
https://github.com/kiwix/kiwix-desktop/pull/538
So they look like in attached picture.
For long texts this is OK, exactly what needed, but short texts are centered and fade-out also.
It would be better if we can set stylesheet individually for each tab as previously requested by other people:
https://bugreports.qt.io/browse/QTBUG-8930
https://bugreports.qt.io/browse/QTBUG-72063