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. Qt Stylesheets to inherit previous attributes.
Forum Updated to NodeBB v4.3 + New Features

Qt Stylesheets to inherit previous attributes.

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt4stylesheetcssqss
5 Posts 2 Posters 2.0k 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
    Streakflash
    wrote on last edited by
    #1

    I'm setting my app style to "cleanlooks" in general but now i need to change TAB border-top-color.

    When I'm touching "QTabBar::tab::selected" attribute QT is overriding whole attributes and in result im not getting what i wanted, i have to reimplement whole Qtabbar to be as like as in cleanlooks style but without the blue line,

    QTabBar::tab:selected {
    border-top-color: 
    transparent;
    }
    

    reimplementing whole qtabbar is going wrong because left margine has stucked out pixels which i cannot fix

    QTabBar::tab {
        background: #EEEBE6;
        border: 2px solid transparent;
        border-top-left-radius: 2px;
        border-top-right-radius: 2px;
        min-width: 8ex;
        padding: 2px;
        padding-left: 10px;
        padding-right: 10px;
        text-align: center;
    }
    QTabBar::tab:selected, QTabBar::tab:hover {
    background: #EEEBE6;
    }
    QTabBar::tab:selected {
    margin-top: 2px;
    }
    
    QTabBar::tab:selected {margin-left: -4px; margin-right: -4px;}
    QTabBar::tab:first:selected { margin-left: 0; }
    QTabBar::tab:last:selected { margin-right: 0;  }
    TabBar::tab:only-one { margin: 0; }
    

    stucked out pixel image

    Can anyone help me with cleanlooks tabbar selected item reimplementation?

    S 1 Reply Last reply
    0
    • S Streakflash

      I'm setting my app style to "cleanlooks" in general but now i need to change TAB border-top-color.

      When I'm touching "QTabBar::tab::selected" attribute QT is overriding whole attributes and in result im not getting what i wanted, i have to reimplement whole Qtabbar to be as like as in cleanlooks style but without the blue line,

      QTabBar::tab:selected {
      border-top-color: 
      transparent;
      }
      

      reimplementing whole qtabbar is going wrong because left margine has stucked out pixels which i cannot fix

      QTabBar::tab {
          background: #EEEBE6;
          border: 2px solid transparent;
          border-top-left-radius: 2px;
          border-top-right-radius: 2px;
          min-width: 8ex;
          padding: 2px;
          padding-left: 10px;
          padding-right: 10px;
          text-align: center;
      }
      QTabBar::tab:selected, QTabBar::tab:hover {
      background: #EEEBE6;
      }
      QTabBar::tab:selected {
      margin-top: 2px;
      }
      
      QTabBar::tab:selected {margin-left: -4px; margin-right: -4px;}
      QTabBar::tab:first:selected { margin-left: 0; }
      QTabBar::tab:last:selected { margin-right: 0;  }
      TabBar::tab:only-one { margin: 0; }
      

      stucked out pixel image

      Can anyone help me with cleanlooks tabbar selected item reimplementation?

      S Offline
      S Offline
      Streakflash
      wrote on last edited by
      #2

      anyone?!

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

        Hi,

        If it's only a color question, did you check with QPalette ? It might be a bit lighter for that

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

        S 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          If it's only a color question, did you check with QPalette ? It might be a bit lighter for that

          S Offline
          S Offline
          Streakflash
          wrote on last edited by
          #4

          @SGaist No Pallet is not able to change the border color, atleast i could not figure out how to do this.

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

            Which border are you referring to ?

            Can you post an image of how you would like your QTabBar to look exactly ?

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