Compare commits

..

3 Commits

Author SHA1 Message Date
kleuter
7cd5e9532e update to Qt 6.8.3 2025-04-21 18:20:29 +02:00
Kleuter
a1fc369ce9
Merge pull request #39 from wsxarcher/patch-4
Fix mingw GCC compilation with explicit cast of function pointer to void*
2025-04-21 18:01:31 +02:00
Marco Bartoli
f77cd07e31 Explicit cast qwin10helpers.cpp GetProcAddress 2025-03-23 01:08:17 +01:00
9 changed files with 18 additions and 9 deletions

View File

@ -1,10 +1,12 @@
This repository provides a backport of the Qt 6.8.2 qtbase module, tailored for compatibility with Windows 7, 8 and 8.1. It contains patched source files from the qtbase module, along with some additional required files. To apply the backport, simply copy the contents of the src folder into your qtbase/src directory, replacing the existing files.
This repository provides a backport of the Qt 6 qtbase module, tailored for compatibility with Windows 7, 8 and 8.1. It contains patched source files from the qtbase module, along with some additional required files. To apply the backport, simply copy the contents of the src folder into your qtbase/src directory, replacing the existing files.
The most recent supported version is **6.8.3** however many older versions are supported as well (see **Older versions** section).
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 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.2 designer running on Windows 7**:
**Qt 6.8.3 designer running on Windows 7**:
![Qt Designer](designer.png)
@ -23,6 +25,7 @@ Many of other Qt 6 modules are known to work fine on Windows 7 without modificat
### Older versions:
- [Qt 6.8.2](https://github.com/crystalidea/qt6windows7/releases/tag/v6.8.2)
- [Qt 6.8.1](https://github.com/crystalidea/qt6windows7/releases/tag/v6.8.1)
- [Qt 6.8.0](https://github.com/crystalidea/qt6windows7/releases/tag/v6.8.0)
- [Qt 6.7.2](https://github.com/crystalidea/qt6windows7/releases/tag/v6.7.2)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -651,7 +651,7 @@ void QBasicMutex::lockInternal() QT_MUTEX_LOCK_NOEXCEPT
}
Q_ASSERT(d_ptr.loadRelaxed());
} else {
lockInternal(-1);
lockInternal(QDeadlineTimer::Forever);
}
}

View File

@ -3609,6 +3609,7 @@ ID3D11UnorderedAccessView *QD3D11Texture::unorderedAccessViewForLevel(int level)
} else if (is3D) {
desc.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D;
desc.Texture3D.MipSlice = UINT(level);
desc.Texture3D.WSize = UINT(m_depth);
} else {
desc.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE2D;
desc.Texture2D.MipSlice = UINT(level);

View File

@ -1006,6 +1006,7 @@ void QD3D12CommandBuffer::visitStorageImage(QD3D12Stage s,
} else if (is3D) {
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE3D;
uavDesc.Texture3D.MipSlice = UINT(d.level);
uavDesc.Texture3D.WSize = UINT(-1);
} else {
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2D;
uavDesc.Texture2D.MipSlice = UINT(d.level);
@ -3659,7 +3660,7 @@ void QRhiD3D12::finishActiveReadbacks(bool forced)
if (readback.result->completed)
completedCallbacks.append(readback.result->completed);
activeReadbacks.removeLast();
activeReadbacks.remove(i);
}
}

View File

@ -71,7 +71,7 @@ void * WIN_LoadComBaseFunction(const char *name)
s_bLoaded = true;
}
if (s_hComBase) {
return ::GetProcAddress(s_hComBase, name);
return (void *) ::GetProcAddress(s_hComBase, name);
} else {
return NULL;
}

View File

@ -105,7 +105,7 @@ struct QWindowsIntegrationPrivate
#if QT_CONFIG(accessibility)
QWindowsUiaAccessibility m_accessibility;
#endif
QWindowsServices m_services;
mutable QScopedPointer<QWindowsServices> m_services;
};
template <typename IntType>
@ -606,7 +606,10 @@ QPlatformTheme *QWindowsIntegration::createPlatformTheme(const QString &name) co
QPlatformServices *QWindowsIntegration::services() const
{
return &d->m_services;
if (d->m_services.isNull())
d->m_services.reset(new QWindowsServices);
return d->m_services.data();
}
void QWindowsIntegration::beep() const

View File

@ -306,6 +306,7 @@ void QWindowsTheme::populateLightSystemBasePalette(QPalette &result)
const QColor background = getSysColor(COLOR_BTNFACE);
const QColor textColor = getSysColor(COLOR_WINDOWTEXT);
const QColor accent = qt_accentColor(AccentColorNormal);
const QColor accentDark = qt_accentColor(AccentColorDark);
const QColor accentDarker = qt_accentColor(AccentColorDarker);
const QColor accentDarkest = qt_accentColor(AccentColorDarkest);
@ -314,7 +315,7 @@ void QWindowsTheme::populateLightSystemBasePalette(QPalette &result)
const QColor btnFace = background;
const QColor btnHighlight = getSysColor(COLOR_BTNHIGHLIGHT);
result.setColor(QPalette::Highlight, getSysColor(COLOR_HIGHLIGHT));
result.setColor(QPalette::Highlight, accent);
result.setColor(QPalette::WindowText, getSysColor(COLOR_WINDOWTEXT));
result.setColor(QPalette::Button, btnFace);
result.setColor(QPalette::Light, btnHighlight);

View File

@ -798,7 +798,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
case PE_FrameFocusRect:
if (const QStyleOptionFocusRect *fropt = qstyleoption_cast<const QStyleOptionFocusRect *>(opt)) {
//### check for d->alt_down
if (!(fropt->state & State_KeyboardFocusChange) && !proxy()->styleHint(SH_UnderlineShortcut, opt))
if (!(fropt->state & State_KeyboardFocusChange) && !proxy()->styleHint(SH_UnderlineShortcut, opt, w))
return;
QRect r = opt->rect;
p->save();