Comments (4)
same problem, and cannot maximized when double click header.
from framelesshelper.
源码中的 if (currentVersion < QOperatingSystemVersion::Windows8)
未对win8以下的系统进行处理,
同时,在win10下某些机器上会导致显示错位的的问题
void NativeWindowHelperPrivate::updateWindowStyle()
{
Q_Q(NativeWindowHelper);
Q_CHECK_PTR(window);
HWND hWnd = reinterpret_cast<HWND>(window->winId());
if (NULL == hWnd)
return;
else if (oldWindow == hWnd)
{
return;
}
oldWindow = hWnd;
NativeWindowFilter::deliver(window, q);
QOperatingSystemVersion currentVersion = QOperatingSystemVersion::current();
if (currentVersion < QOperatingSystemVersion::Windows8)
{
return;
}
LONG oldStyle = WS_OVERLAPPEDWINDOW | WS_THICKFRAME
| WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;;
LONG newStyle = WS_POPUP | WS_THICKFRAME;
if (QtWin::isCompositionEnabled())
newStyle |= WS_CAPTION;
if (window->flags() & Qt::CustomizeWindowHint)
{
if (window->flags() & Qt::WindowSystemMenuHint)
newStyle |= WS_SYSMENU;
if (window->flags() & Qt::WindowMinimizeButtonHint)
newStyle |= WS_MINIMIZEBOX;
if (window->flags() & Qt::WindowMaximizeButtonHint)
newStyle |= WS_MAXIMIZEBOX;
}
else
{
newStyle |= WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
}
LONG currentStyle = GetWindowLong(hWnd, GWL_STYLE);
SetWindowLong(hWnd, GWL_STYLE, (currentStyle & ~oldStyle) | newStyle);
SetWindowPos(hWnd, NULL, 0, 0, 0, 0,
SWP_NOOWNERZORDER | SWP_NOZORDER |
SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE);
if (QtWin::isCompositionEnabled())
QtWin::extendFrameIntoClientArea(window, 1, 1, 1, 1);
}
from framelesshelper.
@hcaihao @564398053 内容显示错乱,两位大佬有好的解决方法吗?
from framelesshelper.
Try StyleWindow in my repositories.
from framelesshelper.
Related Issues (18)
- QML 窗口关闭会崩溃问题
- 在多个显示器之间切换时,界面错位并失效 HOT 11
- link错误,QT 5.15.2, VS2019 64bit
- Multiple screen problem HOT 2
- 如何设置可伸缩?
- 设置Qt::WA_TranslucentBackground属性后无法最大化
- QWidget下点击最大化按钮后,如果鼠标不移动,最大化按钮的hover状态无法取消
- Cannot play video with QMediaPlayer
- 缩放QML窗口右上角有系统的关闭按钮 HOT 4
- Resize会忽视当前屏幕dpr导致错误 HOT 3
- 你好
- 窗口大小和位置的计算有问题 HOT 6
- 去除对widgets模块的强制依赖 HOT 4
- 不能跨平台 HOT 1
- Facing issues on Windows 10, Qt 5.12.1 MSVC 2015 & MSVC 2017 HOT 11
- 5.12
- Maximize window issue. Windows 10, Qt 5.13.1, MSVC 2017 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from framelesshelper.