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. [Workaround]Background image of one form carried over the next !!!
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 4 Posters 3.7k 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

    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
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

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

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

        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
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on last edited by
          #4

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

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

            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
            0
            • A Offline
              A Offline
              alfah
              wrote on last edited by
              #6

              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
              0
              • L Offline
                L Offline
                loladiro
                wrote on last edited by
                #7

                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
                0

                • Login

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