Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Basic Qt Creator Qmake Config
Qt 6.11 is out! See what's new in the release blog

Basic Qt Creator Qmake Config

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 3 Posters 672 Views 2 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.
  • L Offline
    L Offline
    Laplace
    wrote on last edited by Laplace
    #1

    Hi,

    I have a basic project Qt project that I am working with. This is my first time using Qt Creator. I am trying to build for both Mac and Windows, and would like the setup to be as simple as possible (i.e. open the project, select a kit, hit build and then deploy). I am trying to use .pro project files with qmake to achieve this.

    In my project file, I specify a couple of options, for example:

    QT += core gui
    

    And:

    settings.files = $$PWD/settings.txt
    settings.path = $$OUT_PWD
    INSTALLS +=  settings
    

    I would think this results in two things:

    1. The Qt Core and GUI DLLs are copied to the build directory.
    2. The file settings.txt is copied to the build directory.

    But what actually happens:

    1. No DLLs are copied and running the .exe results in an error stating Qt5Core.dll was not found.
    2. No settings.txt file in the build folder.

    All of this is playing around with the analogclock example.

    Am I doing something wrong? Do these options not do what I think they do? Do I need to configure something in Qt Creator?

    Thanks!

    jsulmJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      The INSTALL variable is used for the "make install" command not on build.

      If you want to deploy your application on Windows then you should use windeployqt.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • L Offline
        L Offline
        Laplace
        wrote on last edited by Laplace
        #3

        I tried windeployqt. It will copy the DLLs. But I also already knew which ones I needed, so the auto-detection part is not very helpful. It also does not copy my settings file. Can this not be done/configured via the Qt Creator deploy process? Thanks!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Add a custom build step to call make install.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • L Laplace

            Hi,

            I have a basic project Qt project that I am working with. This is my first time using Qt Creator. I am trying to build for both Mac and Windows, and would like the setup to be as simple as possible (i.e. open the project, select a kit, hit build and then deploy). I am trying to use .pro project files with qmake to achieve this.

            In my project file, I specify a couple of options, for example:

            QT += core gui
            

            And:

            settings.files = $$PWD/settings.txt
            settings.path = $$OUT_PWD
            INSTALLS +=  settings
            

            I would think this results in two things:

            1. The Qt Core and GUI DLLs are copied to the build directory.
            2. The file settings.txt is copied to the build directory.

            But what actually happens:

            1. No DLLs are copied and running the .exe results in an error stating Qt5Core.dll was not found.
            2. No settings.txt file in the build folder.

            All of this is playing around with the analogclock example.

            Am I doing something wrong? Do these options not do what I think they do? Do I need to configure something in Qt Creator?

            Thanks!

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • L Offline
              L Offline
              Laplace
              wrote on last edited by
              #6

              Thank you for your help @SGaist .

              I ended up settling for this method. It's more complicated than using the INSTALL variable but does not require adding an extra build step (which I feel would be more error-prone).

              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