Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. PushButton background not visible
Forum Updated to NodeBB v4.3 + New Features

PushButton background not visible

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 2 Posters 4.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.
  • A Offline
    A Offline
    alfah
    wrote on last edited by
    #1

    hello,

    The background color set to pushbutton is not visible since i have put a background image to the form. When i remove the background image of the form, I can see the color of the pushbutton. :(

    alfah

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Hi alfah,

      There are several solutions for this depending on your likes.
      If you click on the "transparent" tag on the right you will find the ones(FAQ, wiki, topics) on devnet.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alfah
        wrote on last edited by
        #3

        hey eddy

        well

        as per your suggestion i checked out this link
        http://developer.qt.nokia.com/faq/answer/i_change_the_background_color_of_my_child_widgets_but_the_color_does_not_ch

        one of the suggestion is to change set setAutoFillBackground(true). Since this property does not work with stylesheets. I removed the style sheets and added. But i dont see any change. The form has a background image. Is it the reason???
        @
        QPalette pal = ui->pushButton->palette();
        pal.setColor(QPalette::Highlight,QColor("Green"));
        ui->pushButton->setAutoFillBackground(true);
        @

        alfah

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #4

          Can you show us some more code? Where and how do you set the image?

          Qt Certified Specialist
          www.edalsolutions.be

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alfah
            wrote on last edited by
            #5

            form's background image is set at the sytesheet of the form usin the designer

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alfah
              wrote on last edited by
              #6

              hello everyone

              I found the following link abt the transparecy.
              http://doc.qt.nokia.com/qq/qq16-background.html

              Should I set the autofillproperty of each widget to preserve eahc widgets properties so that content propagation does not take place???

              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