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. How I can make QTabWidget tab page position centralized as in mac os x ?

How I can make QTabWidget tab page position centralized as in mac os x ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.2k Views
  • 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.
  • R Offline
    R Offline
    RahibeMeryem
    wrote on last edited by
    #1

    Hi,

    When I create QTabWidget with tabs tabs shown on the central but in ubuntu they are not centralised . I cant make it .

    Is there any solution ?

    jsulmJ 1 Reply Last reply
    0
    • R RahibeMeryem

      Hi,

      When I create QTabWidget with tabs tabs shown on the central but in ubuntu they are not centralised . I cant make it .

      Is there any solution ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @rahibemeryem Why do you want to change the default behaviour of the platform? It is better to stick to platform defaults to not to disturb your users.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • R Offline
        R Offline
        RahibeMeryem
        wrote on last edited by
        #3

        @jsulm if there is no trivial way yes you right . I just wonder did I miss some configuration.

        Best

        jsulmJ 1 Reply Last reply
        0
        • R RahibeMeryem

          @jsulm if there is no trivial way yes you right . I just wonder did I miss some configuration.

          Best

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @rahibemeryem Look for QTabWidget in https://doc.qt.io/qt-5/stylesheet-reference.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            There is an example in the docs for this: https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar

            QTabWidget::tab-bar {
                alignment: center;
            }
            

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply
            3

            • Login

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