Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTabBar set TabShape to Triangular using stylesheet
Forum Updated to NodeBB v4.3 + New Features

QTabBar set TabShape to Triangular using stylesheet

Scheduled Pinned Locked Moved General and Desktop
qtabbarstylesheettriangular
4 Posts 2 Posters 2.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 6 Aug 2015, 10:01 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 6 Aug 2015, 21:52 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 7 Aug 2015, 10:11 last edited by HappyCoder 8 Jul 2015, 10:11
        #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
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 7 Aug 2015, 21:23 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

          2/4

          6 Aug 2015, 21:52

          • Login

          • Login or register to search.
          2 out of 4
          • First post
            2/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved