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. Advice about deploying with extra files
Forum Updated to NodeBB v4.3 + New Features

Advice about deploying with extra files

Scheduled Pinned Locked Moved General and Desktop
17 Posts 2 Posters 6.2k 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.
  • C Offline
    C Offline
    crispylx
    wrote on last edited by
    #4

    Thanks for the pointer, I think I'm close. I now have a resource file and I can set the style sheet to reference that so now, when I look in Qt Creator and select the form, I can see the image as the background. However, if I run the program I just get the normal grey background. I've tried rebuilding and cleaning etc but still just the grey background.
    What step have I missed?
    Chris

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

      can you give us the stylesheet code you used or what you used in Qt Creator?

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • C Offline
        C Offline
        crispylx
        wrote on last edited by
        #6

        in Qt Creator, right clicked on project, add new, Qt Resource file, chose name, added to project. Then chose prefix and added file. Save.
        Open the form - selected main window, on right menu, property -> style sheet.
        In the edit style sheet, add resource, and then background-image: url(:/new/prefix1/IMAGE.jpg);
        Now the form has the wonderful IMAGE as the background, until I hit build... then it doesnt.

        Thanks Eddy.

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

          that's strange.
          if i do the same i see the image in both my preview as when i build it.

          what version do you have of Qt and Qt Creator?
          menu help < about Qt Creator. There you will see both versions.

          Qt Certified Specialist
          www.edalsolutions.be

          1 Reply Last reply
          0
          • C Offline
            C Offline
            crispylx
            wrote on last edited by
            #8

            Qt Creator 2.0.1
            Based on Qt 4.7.0 (32 bit)

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

              i'm on Qt Creator 2.2 Based on Qt 4.7.4 (64 bit)

              you could search bug tracker to see if there is ann issue. obviously it's resolved in my later version.
              "use this link :http://developer.qt.nokia.com/contribute
              .

              Qt Certified Specialist
              www.edalsolutions.be

              1 Reply Last reply
              0
              • C Offline
                C Offline
                crispylx
                wrote on last edited by
                #10

                I've tried it on a new file and it works. It seems I have a ui header file that is over-riding any work i do on the form. Is there a way to create a new header file for the form? or a way to delete the header file?

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

                  If you delete the ui header file in windows explorer and build again?

                  Qt Certified Specialist
                  www.edalsolutions.be

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    crispylx
                    wrote on last edited by
                    #12

                    I get the error message:

                    No rule to make target '.. ui_MYPROJECT.h', needed by 'debug/MYPROJECT.o'. Stop

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

                      Delete your build directory or use Qt Creator > clean.

                      Run qmake again and build.

                      Qt Certified Specialist
                      www.edalsolutions.be

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        crispylx
                        wrote on last edited by
                        #14

                        I did Build-> Clean All, then Run qmake, then Build All.... the header file is unfortunately the same. Grr

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

                          There must be something else going on. Can you use your ui file in a newly created project and see what happens then?

                          Qt Certified Specialist
                          www.edalsolutions.be

                          1 Reply Last reply
                          0
                          • C Offline
                            C Offline
                            crispylx
                            wrote on last edited by
                            #16

                            Unfortunately nothing, it seems the header file is overwriting any changes I make to the ui form. for example if I edit the ui header file and change the window title... then it changes. I've tried copying to a new file but I get a hundred odd error messages saying:
                            "invalid use of incomplete type 'struct Ui::MYPROJECT'"
                            or
                            forward declaration of 'struct Ui::MYPROJECT'

                            am just about getting ready to throw my computer out of the window

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

                              Normally you do nothing in the ui header file. Qt generates it for you.

                              Did you alter things there before?
                              If you clean your project it shouldn't be there anymore.
                              Did you delete it in windows explorer? Make sure it's deleted before running qmake and building again

                              Qt Certified Specialist
                              www.edalsolutions.be

                              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