更新代码
This commit is contained in:
@@ -319,7 +319,7 @@ bool FramelessDialog::nativeEvent(const QByteArray &eventType, void *message, lo
|
||||
}
|
||||
|
||||
//识别标题栏拖动产生半屏全屏效果
|
||||
if (titleBar != 0 && titleBar->rect().contains(pos)) {
|
||||
if (titleBar && titleBar->rect().contains(pos)) {
|
||||
QWidget *child = titleBar->childAt(pos);
|
||||
if (!child) {
|
||||
*result = HTCAPTION;
|
||||
|
||||
@@ -319,7 +319,7 @@ bool FramelessMainWindow::nativeEvent(const QByteArray &eventType, void *message
|
||||
}
|
||||
|
||||
//识别标题栏拖动产生半屏全屏效果
|
||||
if (titleBar != 0 && titleBar->rect().contains(pos)) {
|
||||
if (titleBar && titleBar->rect().contains(pos)) {
|
||||
QWidget *child = titleBar->childAt(pos);
|
||||
if (!child) {
|
||||
*result = HTCAPTION;
|
||||
|
||||
@@ -319,7 +319,7 @@ bool FramelessWidget::nativeEvent(const QByteArray &eventType, void *message, lo
|
||||
}
|
||||
|
||||
//识别标题栏拖动产生半屏全屏效果
|
||||
if (titleBar != 0 && titleBar->rect().contains(pos)) {
|
||||
if (titleBar && titleBar->rect().contains(pos)) {
|
||||
QWidget *child = titleBar->childAt(pos);
|
||||
if (!child) {
|
||||
*result = HTCAPTION;
|
||||
|
||||
@@ -26,7 +26,7 @@ FramelessWidget2::FramelessWidget2(QObject *parent) : QObject(parent)
|
||||
|
||||
bool FramelessWidget2::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
if (widget != 0 && watched == widget) {
|
||||
if (widget && watched == widget) {
|
||||
if (event->type() == QEvent::WindowStateChange) {
|
||||
//解决mac系统上无边框最小化失效的bug
|
||||
#ifdef Q_OS_MACOS
|
||||
|
||||
Reference in New Issue
Block a user