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. QTabWidget/QTabBar Unique Background Images
Forum Updated to NodeBB v4.3 + New Features

QTabWidget/QTabBar Unique Background Images

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

    I'm looking to modify the tabs on a QTabBar of a QTabWidget to have a unique background per tab. I have tried using QSS but that sets the same image on all tabs. I also want the appearance of the tabs to be more like a button, i.e. you don't see the tab edges, there are just images lined up with each other.

    Any tips/ideas how to do this? Can this be done in the designer?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      It would be doable I think by subclassing QTabBar and/or using a proxy style, but not using designer.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BrianJw
        wrote on last edited by
        #3

        Any links/examples I can look at? The closest I've seen is a custom QTabWidget that gives access to tabBars->setPallete() but that sets the same image to all tabs.

        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