title: VS2019 not properly importing Qt Designer project
body: <p>I have looked everywhere for a solution to this, but I cannot find one. In VS2019, I have the Qt tools extension installed, and I have exported the C++ header file from Qt Designer including my project.
  I then created a .pro file including:</p>
  <pre><code>QT += widgets
  QT += uitools
  
  HEADERS += ui_xinterface.h
  FORMS += xinterface.ui
  SOURCES += main.cpp
  </code></pre>
  <p>I then imported this into VS2019, which created a project automatically. I then added this function to main.cpp, as per <a href="https://doc.qt.io/qt-5/designer-using-a-ui-file.html#the-uitools-approach" rel="nofollow noreferrer">this example</a> (note: main.cpp is originally an empty file):</p>
  <pre><code>#include &lt;QtUiTools&gt;
  #include &quot;ui_xinterface.h&quot;
  
  static QWidget* loadUiFile(QWidget* parent)
  {
      QFile file(&quot;:/forms/xinterface.ui&quot;);
      file.open(QIODevice::ReadOnly);
  
      QUiLoader loader;
      return loader.load(&amp;file, parent);
  }
  </code></pre>
  <p>This didn't build:</p>
  <pre><code>Build started...
  1&gt;------ Build started: Project: ui_interface, Configuration: Debug x64 ------
  1&gt;main.cpp
  1&gt;Qt6EntryPointd.lib(qtentrypoint_win.cpp.obj) : error LNK2019: unresolved external symbol main referenced in function WinMain
  1&gt;debug\\ui_interface.exe : fatal error LNK1120: 1 unresolved externals
  1&gt;Done building project &quot;ui_interface.vcxproj&quot; -- FAILED.
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  <p>And gave 9 errors:</p>
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error   LNK1120 1 unresolved externals  ui_interface    C:\Users\User\Documents\EE\basic-app\debug\ui_interface.exe 1   
  Error   LNK2019 unresolved external symbol main referenced in function WinMain  ui_interface    C:\Users\User\Documents\EE\basic-app\Qt6EntryPointd.lib(qtentrypoint_win.cpp.obj)   1   
  Error (active)  E2422   defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr  ui_interface    C:\Qt\6.2.0\msvc2019_64\include\QtCore\qmetatype.h  444 
  Error (active)  E0028   expression must have a constant value   ui_interface    C:\Qt\6.2.0\msvc2019_64\include\QtCore\qmetatype.h  2181    
  Error (active)  E0028   expression must have a constant value   ui_interface    C:\Qt\6.2.0\msvc2019_64\include\QtCore\qmetatype.h  2261    
  Error (active)  E2422   defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr  ui_interface    C:\Qt\6.2.0\msvc2019_64\include\QtCore\qmutex.h 150 
  Error (active)  E2422   defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr  ui_interface    C:\Qt\6.2.0\msvc2019_64\include\QtCore\qmutex.h 205 
  Error (active)  E2422   defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr  ui_interface    C:\Qt\6.2.0\msvc2019_64\include\QtCore\qproperty.h  255 
  Error (active)  E2422   defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr  ui_interface    C:\Qt\6.2.0\msvc2019_64\include\QtCore\qrunnable.h  56* 
  </code></pre>
  <p>These seem like linker errors but I have no idea how to fix them. The additional libraries [$(Qt_INCLUDEPATH_)] and directories [$(Qt_LIBPATH_)] seems to be linked automatically in project properties. I'm quite new to this, what am I missing?</p>