Do not get the look of Windows 7

I recently downloaded and built qt 4.7.4 locally, but there is one problem that I have encountered since using it. I will not get the look of Windows 7. I have not had this problem since 4.6.3. This is what my designer.exe looks like:

enter image description here

I keep getting this view, although I tried to open the application with the following commands:

designer.exe -style windowsxp designer.exe -style windowsvista 

I tried to open the application using the CDE and Plastique styles, and those that will be applied to the application.

This look is also preserved with my own Qt GUI projects. Any help or ideas are appreciated.

Edit:

My Qt configuration is as follows:

 -opensource -platform win32-g++ -qt-sql-sqlite -no-qt3support -no-3dnow -no-phonon -no-multimedia -no-audio-backend -no-webkit -no-native-gestures -no-qmake 
+6
source share
2 answers

I have the same problem with Qt 4.8.0 too.

Before attempting to reconfigure with -qt-style-windowsvista you need to install the Windows SDK for Windows 7 from the Microsoft website. Otherwise, custom style detection will fail.

See http://www.slideshare.net/qtbynokia/how-to-make-your-qt-app-look-native (slide 8) and http://lists.qt.nokia.com/pipermail/qt- interest / 2010-November / 028971.html

Also, if you have GCC 4.6 or later, use -platform win32-g++-4.6

This is how I solved the same problem with Qt 4.8.0 yesterday using MinGW64 (TDM GCC 4.6.1):

  • install the Windows SDK in the default directory ( %WINSDK% in my instruction list)
  • add %WINSDK%\bin to PATH (or %WINSDK%\bin\x64 for 64-bit Windows)
  • a configure call with the following parameters (among others): -native-gestures -qt-style-windowsxp -qt-style-windowsvista
  • check the first configure output lines to see if windowsvista style is enabled.
  • build Qt: mingw32-make or nmake (VS)

Now both the Qt designer and my applications have the appearance of Windows 7 (Qt style) (and in my case, 64-bit executables are executed).

+4
source

It seems that the windowsxp and windowsvista styles are not configured correctly for compilation, you can add -style-windowsxp and -style-windowsvista to your configure command line and rebuild your qt source.

0
source

Source: https://habr.com/ru/post/897003/


All Articles