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. Problem with QTabBar tabs hovering when hover scroller buttons
Forum Updated to NodeBB v4.3 + New Features

Problem with QTabBar tabs hovering when hover scroller buttons

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 540 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.
  • H Offline
    H Offline
    Helge1980
    wrote on last edited by Helge1980
    #1

    Hello!
    I have a problem with QTabBar tabs hovering when hover scroller buttons.
    Here are the styles I applied:

    QTabWidget::pane {background-color: #f1f1f1; border:none;}
    QTabWidget::tab-bar {width: auto; height: 28px; left: 112px;}
    QTabBar::tab {width:135px; background-color: #f1f1f1; border: 0 none; 
    min-width: 41px; max-width: 135px; height: 28px; margin: 0 0 0 0;}
    QTabBar::tab {border-right: 1px solid #a5a5a5;}
    QTabBar::tab:hover{background-color: #cecece;}
    QTabBar::tab:selected{background-color: #515252;}
    QTabBar::tab-label{active:#fff;normal:#444;}
    

    Screenshot from 2021-12-22 10-20-14.png

    I also tried to redefine stylesSheet when hovering over scroller buttons,
    but in this case another problem appears: tabs moves to its original position
    each time when changing styleSheet.

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

      Hi,

      Is that the selected tab ?

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

      H 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Is that the selected tab ?

        H Offline
        H Offline
        Helge1980
        wrote on last edited by Helge1980
        #3

        @SGaist

        No, this tab is highlighted as if I put the cursor on it,
        but in fact the cursor is only on the scroller button at this moment.

        1 Reply Last reply
        0
        • H Offline
          H Offline
          Helge1980
          wrote on last edited by Helge1980
          #4

          I tried to redefine the parent for these buttons of scroller (for the QToolButton's), in this case,
          there is no overlap on hover, but the width of the buttons do not always turn out to be the same
          (despite the fact that in css tables they are defined as buttons of the same width).

          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