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. How to map a ui->Widget to PaintEvent
QtWS25 Last Chance

How to map a ui->Widget to PaintEvent

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 142 Views
  • 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.
  • L Offline
    L Offline
    leinad
    wrote on last edited by
    #1

    I have a bunch of tabs which I built using QtCreator. In mainwindow you can access the tabs using ui->tabWidget->blahblah

    I'd like to know how I can access paintEvents for ui->tabWidget?

    I had a similar post earlier but that was when I created my own tabs programmatically and subclass QTabBar and QTabWidget. But now I have a new requirement where the tabs have already been created using QTCreator and I'd like to change the color of the tabs.

    Any help would be appreciated!

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

      Hi,

      You can't. If you want to do custom painting, you need to subclass. You can then use the promote feature of designer to use your subclass.

      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
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved