Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Workaround]Background image of one form carried over the next !!!

    Mobile and Embedded
    4
    7
    3330
    Loading More Posts
    • 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
      alfah last edited by

      Hey,

      I have about 10 forms in my project.

      For the main form i havnt put any background image. Its a default form with an array of manually created buttons. In the next form , I've put a background image using the designer, jus applying the stylesheet. When i get back to the main form, the background image is carried to the main form, the form as well as all the buttons have the same background image :(.

      I dont want that.
      Could you tell me wat possibly could have gone wrong.

      Thank you

      1 Reply Last reply Reply Quote 0
      • L
        lgeyer last edited by

        Is it possible that you have applied the background image to QWidget instead of a specific widget?

        1 Reply Last reply Reply Quote 0
        • A
          alfah last edited by

          Lukas,

          The main window is of QMainWindow and the Settings form is also of QMainWindows.
          I noticed tht whn u jum from dialog form to a mainwindow form, this does not happen.

          thank you.

          P.S I think the quick fix to the problem is to put a background image to the main form also. Cuz its only when there is no background image, the previous image is loaded

          1 Reply Last reply Reply Quote 0
          • D
            DenisKormalev last edited by

            Looks like you've setted this stylesheet for all QMainWindow's, not for only one.

            1 Reply Last reply Reply Quote 0
            • A
              alfah last edited by

              dennis,

              No, only for settings form I've set a stylesheet, that too using designer.Ive put a jpeg image as background.

              1 Reply Last reply Reply Quote 0
              • A
                alfah last edited by

                This is not really a solution but ive found out a workaround, put a background image for each form, so that it doesn get carried over.

                1 Reply Last reply Reply Quote 0
                • L
                  loladiro last edited by

                  Maybe "this":http://doc.qt.nokia.com/4.7/stylesheet-examples.html#complex-selector-example can help you (especially filtering by object name).

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post