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 change the color of the QWidget?
QtWS25 Last Chance

How to change the color of the QWidget?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.1k 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.
  • O Offline
    O Offline
    opengpu
    wrote on last edited by
    #1

    how to change the color of the QWidget?
    i found setPalette, is there another way ?
    and how to use stylesheet? is there any sample?
    if i wanted to paint the background of the widget by myself, should i only overrider the paint(), and is there any sample as well?
    thank you

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

      Hi,

      Please take a look at Qt's documentation, examples and demo. You have everything there for each of your question.

      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
      • IamSumitI Offline
        IamSumitI Offline
        IamSumit
        wrote on last edited by
        #3

        Hii.

        "GoTo Here":http://qt-project.org/wiki/How_to_Change_the_Background_Color_of_QWidget

        Be Cute

        1 Reply Last reply
        0
        • R Offline
          R Offline
          ralmeida
          wrote on last edited by
          #4

          Qt stylesheet reference:

          http://qt-project.org/doc/qt-5/stylesheet-reference.html

          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