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. C++ source files generated from QML clutter the project folder
Forum Updated to NodeBB v4.3 + New Features

C++ source files generated from QML clutter the project folder

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 481 Views
  • 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.
  • B Offline
    B Offline
    Boaschtel
    wrote on last edited by
    #1

    Hello!
    I have come across an issue when building my application in release mode as compared to debug mode.
    When building the project a bunch of .cpp files based on my .qml files are generated, which are all placed in the root directory of my project.
    This is also happening in debug mode for the .qrc files, which I was living with as this is easy to filter in .gitignore (they are always prefixed with qrc_*.cpp). However, filtering the C++ source files is harder as they don't follow a common naming convention.

    Is there a way to redirect this output to a different location, similar to the configuration I am using in my .pro file for the moc and obj artifacts?

    DESTDIR  = $$PWD\bin
    MOC_DIR = $$PWD\tmp\moc
    OBJECTS_DIR = $$PWD\tmp\obj
    

    I am using Qt 5.12.4 with Qt Creator 4.9.1, compiling with MSVC 2017 32bit.
    Thank you!

    J.HilkJ 1 Reply Last reply
    0
    • B Boaschtel

      Hello!
      I have come across an issue when building my application in release mode as compared to debug mode.
      When building the project a bunch of .cpp files based on my .qml files are generated, which are all placed in the root directory of my project.
      This is also happening in debug mode for the .qrc files, which I was living with as this is easy to filter in .gitignore (they are always prefixed with qrc_*.cpp). However, filtering the C++ source files is harder as they don't follow a common naming convention.

      Is there a way to redirect this output to a different location, similar to the configuration I am using in my .pro file for the moc and obj artifacts?

      DESTDIR  = $$PWD\bin
      MOC_DIR = $$PWD\tmp\moc
      OBJECTS_DIR = $$PWD\tmp\obj
      

      I am using Qt 5.12.4 with Qt Creator 4.9.1, compiling with MSVC 2017 32bit.
      Thank you!

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      hi @Boaschtel

      I think what you're looking for is

      RCC_DIR 
      UI_DIR  //only used for .ui files in QWidgets
      QMLCACHE_DIR
      

      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      1
      • B Offline
        B Offline
        Boaschtel
        wrote on last edited by
        #3

        Thank you, those were the settings I was looking for!

        1 Reply Last reply
        1

        • Login

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