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. [Solved] Making QTab widget scroll buttons bigger.
Forum Updated to NodeBB v4.3 + New Features

[Solved] Making QTab widget scroll buttons bigger.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 5.1k Views 1 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.
  • S Offline
    S Offline
    st2000
    wrote on 22 May 2012, 20:56 last edited by
    #1

    Hi,
    I have been searching on "QTab" and "scroll" and have not found anything. On our target (a touch screen device) I have used more QTabs then there is room for. So Qt uses left/right scroll buttons at the top right corner of the QTab widget to allow the user access to the tabs beyond the left or right side of the QTab widget.

    But the QTab widget scroll buttons are very very small. They are practically impossible to use on a touch screen device.

    How can I increase the size (width) of the QTab left/right scroll buttons?

    -thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      st2000
      wrote on 22 May 2012, 21:53 last edited by
      #2

      Ok, I found my problem. They are not called "scroll" buttons. They are called "scroller". This style sheet text did the trick:
      "QTabBar::scroller{width:85pix;}"

      But that left the buttons transparant. Looked confusing as the tab buttons migrated behind the scroller buttons. So we had to color the back ground of the scroller buttons:
      "QTabBar QToolbutton{background-color:"light blue";}"

      -done

      J 1 Reply Last reply 3 Aug 2015, 20:02
      0
      • S st2000
        22 May 2012, 21:53

        Ok, I found my problem. They are not called "scroll" buttons. They are called "scroller". This style sheet text did the trick:
        "QTabBar::scroller{width:85pix;}"

        But that left the buttons transparant. Looked confusing as the tab buttons migrated behind the scroller buttons. So we had to color the back ground of the scroller buttons:
        "QTabBar QToolbutton{background-color:"light blue";}"

        -done

        J Offline
        J Offline
        Jorge
        wrote on 3 Aug 2015, 20:02 last edited by
        #3

        @st2000 Hello,
        I too have this weird scroll buttons problem that apparently no one else has. I am looking to make them bigger because I will be using a tab widget in an embedded device and the siez is reduced,.
        I, however, do not understand how did you implement your mentioned code.
        Could you please add an example of the implementation? I would greatly appreciate it.
        Thanks in advance.

        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 Extensions
        • Unsolved