Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89106

fade-out tab label instead elide with ...

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.12
    • None
    • All

      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

      1. it applied to all tabs
      2. 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

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            asashnov Alexander Sashnov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes