Qt GUI theme looks old-fashioned

qt use gtk theme
qt dark theme
qt stylesheet
qt fusion style
qt dark theme c++
qt dark theme style sheet
qt c++
qt creator gui

When I cross-compile Qt 5.8.0 from source myself and use it to build the Qt "Dynamic Layouts" example from Qt Widgets 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 MSYS2, 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?

One thing to look into is the QWindowsVistaStyle class. I noticed that when I compiled my program in MSYS2, I had to add -luxtheme because that class referred to some functions from there, like GetThemeColor. 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.

Cross-compiled Qt build details

I built the cross-compiled Qt and the old-looking Dynamic Layouts example using commit f51d834 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 Nix, download nixcrkpkgs, and then run nix-build -A pkgs.i686-w64-mingw32.qt.base-examples in the nixcrpkgs directory. You can see my build recipe for the Qt package in that commit.

MSYS2 build details

I ran this script 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 build recipe for that package.

I had the same issue after upgrading from Qt5.9.1 to Qt5.12.

Placing qwindowsvistastyle.dll, which I found to be in Qt\5.12.0\msvc2017_64\plugins\styles, needed to be placed in my applicationDir\styles directory.

Qt GUI theme on Windows looks old-fashioned, Qt GUI theme on Windows looks old-fashioned. Issue #838 resolved. Roman Telezhynskyi. repo owner created an issue 2018-04-08. I installed Qt 4.8.3 and Qt Creator 2.5.2 on Fedora 17 and Ubuntu 12.04. When I create a GUI application, the visual elements look good in the Qt Designer preview window. However when I run the application, the resulting application has an older style which is inconsistent with the OS and does not match the preview in Qt Designer.

[Solved] Qt Apps look ugly in Windows 8 Consumer Preview, They all look old Win98 style: classic-ish. I haven't applied any theme - it's the default UI. That certainly should look normal, which is the case in  Closing this report since the Win98 theme issue is fixed with Switching between styles updates the GUI immediately. qt-gui-theme-looks-old-fashioned suggests

If you look in the src/widgets/configure.json file from Qt 5.8.0, you can see that it checks for the existence of uxtheme.h, and that uxtheme.h is a precondition for compiling the windowsxp style, which is a precondition for compiling the windowsvista style. By looking in Qt's config.log, I saw that the uxtheme.h test failed. I am not sure why, but it's probably because uxtheme.h cannot be included on its own; you need to include windows.h beforehand. I verified that the windowsxp and windowsvista styles were indeed not enabled by looking in the src/widgets/qtwidgets-config.pri file after configuring Qt. It has a list of styles that are going to get compiled, and windowsvista is not the list.

I tried adding the -style-windowsxp -style-windowsvista options to Qt's configure command, but those options just cause errors because the uxtheme.h test is failing and it is a prerequisite for compiling those themes.

My solution was to apply this patch to Qt 5.8.0 to skip the uxtheme test altogether:

diff -ur qt58-orig/src/widgets/configure.json qt58/src/widgets/configure.json
--- qt58-orig/src/widgets/configure.json        2017-05-28 02:07:07.625626151 -0700
+++ qt58/src/widgets/configure.json     2017-06-27 21:25:52.752628339 -0700
@@ -28,11 +28,6 @@

     "tests": {
-        "uxtheme": {
-            "label": "uxtheme.h",
-            "type": "files",
-            "files": [ "uxtheme.h" ]
-        }

     "features": {
@@ -57,7 +52,7 @@
         "style-windowsxp": {
             "label": "WindowsXP",
-            "condition": "features.style-windows && config.win32 && !config.winrt && tests.uxtheme",
+            "condition": "features.style-windows && config.win32 && !config.winrt",
             "output": [ "styles" ]
         "style-windowsvista": {

I'm not sure why the MSYS2 package worked well, since I don't see any patch like this in their build script.

Qt themes windows, It The Material style is a 100% cross-platform Qt Quick Controls style UPDATE: Microsoft had plans to add tabs UI to Windows 10 File Explorer using a new On Linux though it still has the old look. theme file among its files and aim to be  Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

I had this same issue when upgrading from a static Qt 5.6.3 to static 5.12.0. I solved it after I tried to manually set the "windowsvista" style with QApplication::setStyle() and noticed that it returned null when debugging. It turns out in 5.12.0 the windowsvista style is its own separate plugin and you need to link against plugins/styles/qwindowsvistastyle.lib and add Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin) to the cpp file containing your main function. After that there is no need to manually set the style, it is chosen automatically.

Uniform look for Qt and GTK applications, 4.1 Using a GTK icon theme in Qt apps; 4.2 Add Title bar and frame to GTK3 qtconfig-qt4 ), choose adwaita under Appearance > GUI Style. If you want to see win 95 look then write some GUI in default tkinter without ttk. I think that looks more like win 95. See attachment. However i always thought pyqt4/5 and WxPython in comparison had more of a "modern" look. They are suppose to use the theme of your OS.

PySimpleGUI · PyPI, import PySimpleGUI as sg sg.theme('DarkAmber') # Add a touch of color # All the Create windows that look and operate identically to those created directly with At the moment, to make a traditional GUI window using tkinter, Qt, WxPython  Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.

List of widget toolkits, This article provides a list of widget toolkits used to construct the graphical user interface (GUI) The Windows Template Library (WTL), a template-based extension to ATL and a Nana C++, open source (Boost license), a cross-​platform toolkit designed to enable modern C++ GUI programming; Qt, "The Qt 4 Style API". The widgets integrate well to the underlying platform providing native look'n'feel on Windows, Linux and Mac OSX. Take a look at Qt Widget Gallery: Qt's support for widget styles and themes enables your application to fit in with the native desktop enviroment.

QStyle, QtGui.QStyle class is an abstract base class that encapsulates the look and feel of a GUI. The style of the entire application can be set using the QApplication. to the opposite button (rolling) will press the new button and release the old one. styles do not use the standard palette, but make use of native theme engines. The widgets examples show how some of the widgets available in Qt might appear when configured to use the a particular style. Each style is only available on the respective platfom, and provides native look and feel by integrating to the platform theme. Thus, the final appearance varies depending on the active theme.

  • You need a manifest file: stackoverflow.com/questions/37792366/…
  • I'll try this eventually, but the working GUI did not have a manifest file so I am skeptical. And the thing you linked to has nothing to do with themes or styles.
  • Widgets styles are optional when you build Qt. Meaning that you can choose which styles to build and which not to build. Also some styles requires external dependencies and they can be omitted from the build if you do not provide such dependencies. The Windows Vista style does have external dependencies and might have been skipped from your build. To check which styles are available at run time you can call QStyleFactory::keys().
  • Thanks, I looked around in the Qt source files, and src/widgets/configure.json in particular. The Windows Vista and XP themes depend on "uxtheme.h". From my config.log, I can see that the test for uxtheme.h is failing, but it doesn't say why. I might need to set _WIN32_WINNT in CFLAGS or get more details about why that test is failing.
  • Perhaps Qt draws the styles itself instead of relying on those Windows DLLs to do it. I got things working by configuring Qt correctly; a manifest was never needed.
  • Thank you very much! Such an easy solution! Thumb up!
  • For those who use CMake, you will need something like this: install(PROGRAMS "$<TARGET_FILE:Qt5::QWindowsIntegrationPlugin>" DESTINATION platforms ) and install(PROGRAMS "$<TARGET_FILE:Qt5::QWindowsVistaStylePlugin>" DESTINATION styles )
  • I'll try this eventually, but I'm skeptical because the working GUI did not call setStyle. The working GUI used the exact same code as the ugly one. And both GUIs appear to look like "windows".
  • If I remember correctly, the left picture you showed is the default old linux style, so applying "windows" style should fix that, by forcing the theme used, instead of letting Qt deduce it.
  • When Qt is built properly, it can deduce the right theme to use; there is no need to force it to use a Windows them when it's compiled for Windows.
  • That's correct, I'll modify my answer to add that general info. Upvoted your last answer, which nicely solves the problem!
  • This worked for me with 5.13 as well.