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. [SELF-SOLVED] QTabBar and QSS
Qt 6.11 is out! See what's new in the release blog

[SELF-SOLVED] QTabBar and QSS

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 2.4k 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.
  • T Offline
    T Offline
    tucnak
    wrote on last edited by
    #1

    Hi, community.

    Today I got a new task. I need to make custom tabs in QTabBar - specially it must be cool)). I have background-images for all states of them (normal, selected, inactive), but I need to custom "X" button on them. Also I need to control it (control on selected or not selected tab).

    Now I can do it in this way:
    @
    QTabBar::tab {
    background-image:url(":/way/way/way/img.png");
    }

    QTabBar::tab:selected {
    background-image:url(":/way/way/way/img2.png");
    }
    @

    And in a what way I can change apperiance of "X" button?

    UPD: maybe there are something like this:
    @
    QTabBar::tab:selected QTabBar::close-button {
    /* to customize close button on selected tab /
    /
    will it work? */
    }
    @

    Thanks.

    P.S. It's really sadly that Alexandra leaves Nokia...

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      As far as I understood - this post won't have any answers).

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tucnak
        wrote on last edited by
        #3

        I found solution. In UPD.

        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