修复不能调整窗口尺寸问题
This commit is contained in:
parent
d6a315c487
commit
0c317e9a41
|
@ -83,6 +83,8 @@ void WindowHelper::setWindowGeometry(QWindow *window, const QRect &rect)
|
|||
return;
|
||||
}
|
||||
|
||||
// 窗口系统不存在跟屏幕一样大的普通窗口?
|
||||
window->setWindowState(Qt::WindowNoState);
|
||||
if (QX11Info::isPlatformX11()) {
|
||||
window->setGeometry(rect);
|
||||
|
||||
|
@ -428,6 +430,8 @@ void MenuWindow::updateGeometry()
|
|||
}
|
||||
|
||||
WindowHelper::setWindowGeometry(this, rect);
|
||||
setMinimumSize(geometry().size());
|
||||
setMaximumSize(geometry().size());
|
||||
}
|
||||
|
||||
bool MenuWindow::isFullScreen() const
|
||||
|
@ -484,13 +488,13 @@ void MenuWindow::exposeEvent(QExposeEvent *event)
|
|||
if (isExposed()) {
|
||||
requestActivate();
|
||||
}
|
||||
QQuickWindow::exposeEvent(event);
|
||||
QQuickView::exposeEvent(event);
|
||||
}
|
||||
|
||||
void MenuWindow::focusOutEvent(QFocusEvent *event)
|
||||
{
|
||||
// void QQuickWindow::focusOutEvent(QFocusEvent *ev) { Q_D(QQuickWindow); if (d->contentItem) d->contentItem->setFocus(false, ev->reason()); }
|
||||
QQuickWindow::focusOutEvent(event);
|
||||
QQuickView::focusOutEvent(event);
|
||||
// setVisible(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue