mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-03 07:45:30 +08:00
Compare commits
7 Commits
v6.8.1
...
1b4cd6f752
Author | SHA1 | Date | |
---|---|---|---|
1b4cd6f752 | |||
aabe4f68c7 | |||
263451546b | |||
04ec1a740d | |||
5a8a83f569 | |||
d6525e7907 | |||
45d7e6576d |
@ -2,12 +2,7 @@ This repository provides a backport of the Qt 6.8.1 qtbase module, tailored for
|
||||
|
||||
This approach builds upon the methodology discussed in this forum [thread](https://forum.qt.io/topic/133002/qt-creator-6-0-1-and-qt-6-2-2-running-on-windows-7/60) but offers significant enhancements, including important fallbacks to the default Qt 6 behavior when running on newer versions of Windows.
|
||||
|
||||
You have two options for compiling Qt:
|
||||
|
||||
- Compile it yourself using your preferred compiler and build options.
|
||||
- Use our [compile_win.pl](https://github.com/crystalidea/qt-build-tools/tree/master/6.8.1) build script, which utilizes Visual C++ 2022 and includes OpenSSL 3.0.13 statically linked.
|
||||
|
||||
Alternatively, you can download our [prebuild Qt dlls](https://github.com/crystalidea/qt6windows7/releases), which also include the Qt Designer binary for demonstration purposes.
|
||||
You can compile it yourself using your preferred compiler and build options or can use our [compile_win.pl](https://github.com/crystalidea/qt-build-tools/tree/master/6.8.1) build script, which utilizes Visual C++ 2022 and includes OpenSSL 3.0.13 statically linked. Alternatively, you can download our [prebuild Qt dlls](https://github.com/crystalidea/qt6windows7/releases), which also include the Qt Designer binary for demonstration purposes.
|
||||
|
||||
**Qt 6.8.1 designer running on Windows 7**:
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include <qt_windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <VersionHelpers.h>
|
||||
#include <versionhelpers.h>
|
||||
#include <intshcut.h>
|
||||
#include <qvarlengtharray.h>
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include <VersionHelpers.h>
|
||||
#include <versionhelpers.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -261,16 +261,13 @@ static BOOL GetDisplayAutoRotationPreferences(
|
||||
static BOOL SetProcessDpiAwarenessContext(
|
||||
IN DPI_AWARENESS_CONTEXT DpiContext)
|
||||
{
|
||||
switch ((ULONG_PTR)DpiContext) {
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE:
|
||||
if ((ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE) {
|
||||
//NOTHING;
|
||||
break;
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE:
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE:
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2:
|
||||
} else if ((ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ||
|
||||
(ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ||
|
||||
(ULONG_PTR)DpiContext == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) {
|
||||
SetProcessDPIAware();
|
||||
break;
|
||||
default:
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -287,14 +284,13 @@ static BOOL AreDpiAwarenessContextsEqual(
|
||||
static BOOL IsValidDpiAwarenessContext(
|
||||
IN DPI_AWARENESS_CONTEXT Value)
|
||||
{
|
||||
switch ((ULONG_PTR)Value) {
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE:
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED:
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE:
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE:
|
||||
case (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2:
|
||||
if ((ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE ||
|
||||
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ||
|
||||
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ||
|
||||
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ||
|
||||
(ULONG_PTR)Value == (ULONG_PTR)DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) {
|
||||
return TRUE;
|
||||
default:
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include "../../plugins/platforms/windows/vxkex.h"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -256,8 +258,10 @@ void QWindowsStyle::polish(QPalette &pal)
|
||||
QCommonStyle::polish(pal);
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
typedef BOOL (WINAPI *GetSystemMetricsForDpiFunc)(int, UINT);
|
||||
typedef BOOL (WINAPI *SystemParametersInfoForDpiFunc)(UINT, UINT, PVOID, UINT, UINT);
|
||||
#endif
|
||||
|
||||
int QWindowsStylePrivate::pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *, const QWidget *widget)
|
||||
{
|
||||
|
Reference in New Issue
Block a user