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. Qt VS Tools, how to configure moc'ing
Qt 6.11 is out! See what's new in the release blog

Qt VS Tools, how to configure moc'ing

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 606 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi folks!
    I'm working on a VS 2017 project, after importing a .pri file, when I watch into the .proj I find this really nice piece of XML

    <QtMoc Include="base\starter1.hpp">
          <ForceInclude Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">stdfax.h;$(ProjectDir)ui/%(Filename)%(Extension)</ForceInclude>
          <ForceInclude Condition="'$(Configuration)|$(Platform)'=='Release|x64'">stdfax.h;$(ProjectDir)ui/%(Filename)%(Extension)</ForceInclude>
    </QtMoc>
    

    Instead when I add a single file (right click on the project) I get all this NOT really useful stuff...

    <QtMoc Include="base\Test.hpp">
          <OutputFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\moc_%(Filename).cpp</OutputFile>
          <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.;.\base;.\..\libs\include;.\..\libs\zlib;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtPrintSupport;$(QTDIR)\include\QtQml;$(QTDIR)\include\QtQuick;$(QTDIR)\include\QtQuickWidgets;$(QTDIR)\include\QtQuickControls2;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtUiTools;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtTest;.\GeneratedFiles;.\GeneratedFiles\moc\;</IncludePath>
          <Define Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">UNICODE;QT_AXSERVER_LIB;QT_CORE_LIB;QT_GUI_LIB;QT_HELP_LIB;QT_NETWORK_LIB;QT_PRINTSUPPORT_LIB;QT_QML_LIB;QT_QUICK_LIB;QT_QUICKWIDGETS_LIB;QT_QUICKCONTROLS2_LIB;QT_SVG_LIB;QT_UITOOLS_LIB;QT_WIDGETS_LIB;QT_TESTLIB_LIB;QT_NO_DEBUG;NDEBUG</Define>
          <OutputFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\moc_%(Filename).cpp</OutputFile>
          <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.;.\base;.\..\libs\include;.\..\libs\zlib;$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtPrintSupport;$(QTDIR)\include\QtQml;$(QTDIR)\include\QtQuick;$(QTDIR)\include\QtQuickWidgets;$(QTDIR)\include\QtQuickControls2;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtUiTools;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtTest;.\GeneratedFiles;.\GeneratedFiles\moc\;</IncludePath>
        </QtMoc>
    

    Does somebody know how to configure Qt VS Tools in order to always use the first settings?

    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