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. Why QMessageBox not taking background-color set in stylesheet for all QPushButtons?

Why QMessageBox not taking background-color set in stylesheet for all QPushButtons?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 857 Views 2 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
    tejusoor
    wrote on last edited by tejusoor
    #1

    In my application, I am using qss to do the styling of all UI components. Style changes of QPushButtons are reflected everywhere except in QMessageBox, which is getting created statically as and when needed as per the action. Text color change is reflected. Then why not background color? The button is Standard Button, OK button.

    raven-worxR 1 Reply Last reply
    0
    • T tejusoor

      In my application, I am using qss to do the styling of all UI components. Style changes of QPushButtons are reflected everywhere except in QMessageBox, which is getting created statically as and when needed as per the action. Text color change is reflected. Then why not background color? The button is Standard Button, OK button.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @tejusoor
      where do you set/apply your stylesheet?
      Is your QMessageBox a child of any widget? Because this is required for proper style inheritance.
      Unless you've set the stylesheet on the QApplication instance, which applies it to all top level windows.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1

      • Login

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