Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Problems Compiling QML app in Visual Studio
Qt 6.11 is out! See what's new in the release blog

Problems Compiling QML app in Visual Studio

Scheduled Pinned Locked Moved QML and Qt Quick
27 Posts 5 Posters 32.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.
  • X Offline
    X Offline
    xsacha
    wrote on last edited by
    #10

    Have you changed "font.pixelSize":http://doc.qt.nokia.com/latest/qml-textinput.html#font.pixelSize-prop or "font.pointSize":http://doc.qt.nokia.com/latest/qml-textinput.html#font.pointSize-prop for your elements?

    • Sacha
    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #11

      font.pixelSize, do you I have to go through and change them all?

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #12

        I fixed the font issue but I am still having problems running the .exe. I put all the .dll files in the release folder and now when I run the .exe I get a blank window. Any ideas?

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #13

          Could be it does not find you .qml file?

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #14

            I don't think so, it still works great if I run it through Visual Studio, it only gives me the blank window when I try to run the .exe straight from the release folder. Very frustrating.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DenisKormalev
              wrote on last edited by
              #15

              kyleplattner, where does you qml located? if you just have it in sources and use relative path to it when you should check that this relative paths are ok relatively to exe file.

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #16

                Then probably something else is not found. Unfortunately I never created a QML app on windows, so I can't help further.

                If you don't mind, you could provide a ZIP with a complete sample of your code, so we could test it on our machines.

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #17

                  All of my QML files are in the same directory as my main.cpp along with the release and debug folders.

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    DenisKormalev
                    wrote on last edited by
                    #18

                    kyleplattner, place them in one folder with .exe.

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #19

                      Dennis, I followed your advice and it worked. Everything is in the same folder and it runs. Now how can I send the .exe off to management and get it to run on their machines.

                      1 Reply Last reply
                      0
                      • ? Offline
                        ? Offline
                        A Former User
                        wrote on last edited by
                        #20

                        Or, better, embed it in a resource file (.qrc).

                        1 Reply Last reply
                        0
                        • ? Offline
                          ? Offline
                          A Former User
                          wrote on last edited by
                          #21

                          How do I embed it in a .qrc, what will that do for me?

                          1 Reply Last reply
                          0
                          • ? Offline
                            ? Offline
                            A Former User
                            wrote on last edited by
                            #22

                            [quote author="kyleplattner" date="1291650391"]Dennis, I followed your advice and it worked. Everything is in the same folder and it runs. Now how can I send the .exe off to management and get it to run on their machines. [/quote]

                            Unfortunately, this might not work on non-development machines. It could be that the C/C++ runtimes for your particular version of Visual Studio must be installed on the client's computer. If you have to install it depends, if it was previously installed by some other software or not. Anyways, it does not harm, if you run that vcredist_x86.exe again, it does not install the libs twice.

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              DenisKormalev
                              wrote on last edited by
                              #23

                              If you will have qml files in resource then you will not need to copy them with your exe, they will be inside it.

                              1 Reply Last reply
                              0
                              • ? Offline
                                ? Offline
                                A Former User
                                wrote on last edited by
                                #24

                                How can I package everything up into an installer. What is the easiest way to do this?

                                1 Reply Last reply
                                0
                                • ? Offline
                                  ? Offline
                                  A Former User
                                  wrote on last edited by
                                  #25

                                  [quote author="kyleplattner" date="1291650464"]How do I embed it in a .qrc, what will that do for me?[/quote]

                                  A .qrc file is a Qt resource. It's a means of embedding various kinds of resources (images/icons, sounds, your qml, etc.) into your application exe. In that way you need not ship all that little files on their own.

                                  Have a look at http://doc.qt.nokia.com/latest/resources.html for an introduction on how to use it. As far as I know the visual studio add in support resources.

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    DenisKormalev
                                    wrote on last edited by
                                    #26

                                    You can simply push all needed libraries (together with msvc ones) in zip file and send it to your management. If you need installer then you can use something like BitRock tool to create one.

                                    1 Reply Last reply
                                    0
                                    • ? Offline
                                      ? Offline
                                      A Former User
                                      wrote on last edited by
                                      #27

                                      [quote author="kyleplattner" date="1291650750"]How can I package everything up into an installer. What is the easiest way to do this?[/quote]

                                      There is an overview page on "Building Qt Installers":http://developer.qt.nokia.com/wiki/BuildingQtInstallers in the wiki. Good starting point.

                                      I personally use InnoSetup for Windows.

                                      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