Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTabBar set TabShape to Triangular using stylesheet
Qt 6.12 LTS is out! See what's new in the release blog

QTabBar set TabShape to Triangular using stylesheet

Scheduled Pinned Locked Moved General and Desktop
qtabbarstylesheettriangular
4 Posts 2 Posters 3.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HappyCoder
    wrote on last edited by
    #1

    Hi,

    i'm using stylesheets to modifiy my application.

    How to i set the tabShape from a QTabBar from rounded to triangular with stylesheets?

    Thx

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should be able to do that using this

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • H Offline
        H Offline
        HappyCoder
        wrote on last edited by HappyCoder
        #3

        Hi,

        it helped a little, now i have this im my stylesheet:

        QMdiArea#mdiArea
        {
        qproperty-tabPosition: South;
        qproperty-tabShape: Triangular;
        }

        QMdiArea#mdiArea QTabBar::tab
        {
        background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 lightgray, stop:1 darkgray);
        }

        It is possible to change it with qproperty. But when i apply a background-color or anything
        else to "QMdiArea#mdiArea QTabBar::tab" the tabShape flipped back to "Rounded".

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What if you invert the styling ? Doing the QTabBar before the rest

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt
          • Unsolved