title: Qt GUI theme looks old-fashioned
body: <p>When I cross-compile Qt 5.8.0 from source myself and use it to build the Qt "Dynamic Layouts" example from <a href="http://doc.qt.io/qt-5/qtwidgets-index.html" rel="noreferrer">Qt Widgets</a> for Microsoft Windows, it looks old-fashioned, as if it were running on Windows 2000, as shown in the left window below.  However, if I compile the exact same program using the pre-built mingw-w64-x86_64-qt5-static package (version 5.8.0-1) from <a href="http://www.msys2.org/" rel="noreferrer">MSYS2</a>, it looks like a nice modern Windows application, as shown in the right window below.  How can I fix my version of Qt so that GUIs built with it will look nice?  Is there a configuration option I am missing?</p>
  
  <p><a href="https://i.stack.imgur.com/2CT4G.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2CT4G.png" alt="Left: Qt compiled by me.  Right: Qt compiled by MSYS2 project"></a></p>
  
  <p>One thing to look into is the <code>QWindowsVistaStyle</code> class.  I noticed that when I compiled my program in MSYS2, I had to add <code>-luxtheme</code> because that class referred to some functions from there, like <code>GetThemeColor</code>.  Those functions are only available in Windows Vista and later.  When I cross-compiled using my own Qt on Linux, I didn't need that library, so perhaps that class was somehow disabled in my build.</p>
  
  <h2>Cross-compiled Qt build details</h2>
  
  <p>I built the cross-compiled Qt and the old-looking Dynamic Layouts example using <a href="https://github.com/DavidEGrayson/nixcrpkgs/tree/f51d834ace644c10ae88f9b5c2fc69322b62e73d" rel="noreferrer">commit f51d834</a> of my nixcrpkgs repository.  If you look at the code in that commit, it will show you exactly what commands were run to build the mingw-w64 cross-compiler, and build Qt, and build the Qt examples, including Dynamic Layouts.  You can build it yourself if you install <a href="https://nixos.org/nix/" rel="noreferrer">Nix</a>, download <a href="https://github.com/DavidEGrayson/nixcrpkgs" rel="noreferrer">nixcrkpkgs</a>, and then run <code>nix-build -A pkgs.i686-w64-mingw32.qt.base-examples</code> in the nixcrpkgs directory.  You can see <a href="https://github.com/DavidEGrayson/nixcrpkgs/blob/f51d834ace644c10ae88f9b5c2fc69322b62e73d/pkgs/qt58/default.nix" rel="noreferrer">my build recipe for the Qt package in that commit</a>.</p>
  
  <h2>MSYS2 build details</h2>
  
  <p>I ran <a href="https://gist.github.com/DavidEGrayson/5732a2a68cef9942ebdccb0037fbeaf4" rel="noreferrer">this script</a> in a MINGW64 shell in MSYS2 to build the example and got good results.  It relies on the mingw-w64-x86_64-qt5-static package from MSYS2.  You can see the <a href="https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-qt5-static" rel="noreferrer">build recipe for that package</a>.</p>