title: Building Shared library including Qt libs via QMake on Windows
body: <p>I would like to create a Dll on Windows using QMake+mingw, which includes some custom widgets and the dependent Qt libraries (linked into one library). Can this be achieved via QMake?</p>
  
  <p>What I have tried so far:</p>
  
  <p>Creating shared library project, and adding LIBS to .pro file:</p>
  
  <pre><code>QT       += widgets
  TARGET = testqtdll
  TEMPLATE = lib
  DEFINES += TESTQTDLL_LIBRARY
  SOURCES += testqtdll.cpp widget.cpp
  HEADERS += testqtdll.h testqtdll_global.h widget.h
  FORMS += widget.ui
  LIBS += -lqt5core -lqt5gui -lqt5widgets
  </code></pre>
  
  <p>This way the resulting dll does not include QT libs.</p>
  
  <p>Creating static library project, and link qt static libs. Then create dll after:</p>
  
  <pre><code>QT       += widgets    
  TARGET = testqtlib
  TEMPLATE = lib
  CONFIG += staticlib    
  SOURCES += testqtlib.cpp widget.cpp
  HEADERS += testqtlib.h widget.h
  FORMS += widget.ui
  LIBS += c:/Qt/Static/5.3.1/lib/Qt5Core.a
  LIBS += c:/Qt/Static/5.3.1/lib/Qt5Gui.a 
  LIBS += c:/Qt/Static/5.3.1/lib/Qt5Widgets.a
  </code></pre>
  
  <p>This way the resulting lib also does not include QT libs.</p>