解决双标题栏问题
This commit is contained in:
parent
ab7e0490d9
commit
4ae0c56f5d
|
@ -516,9 +516,19 @@ bool MenuWindow::event(QEvent *event)
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (event->type() == QEvent::UpdateRequest) {
|
||||||
|
WindowHelper::removeHeaderBar(this);
|
||||||
|
}
|
||||||
return QQuickView::event(event);
|
return QQuickView::event(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MenuWindow::showEvent(QShowEvent *event)
|
||||||
|
{
|
||||||
|
//为了主动触发一次updaterequet事件
|
||||||
|
update();
|
||||||
|
QQuickView::showEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
void MenuWindow::onActiveFocusItemChanged()
|
void MenuWindow::onActiveFocusItemChanged()
|
||||||
{
|
{
|
||||||
if (activeFocusItem()) {
|
if (activeFocusItem()) {
|
||||||
|
|
|
@ -140,6 +140,7 @@ protected:
|
||||||
void exposeEvent(QExposeEvent *event) override;
|
void exposeEvent(QExposeEvent *event) override;
|
||||||
void focusOutEvent(QFocusEvent *event) override;
|
void focusOutEvent(QFocusEvent *event) override;
|
||||||
bool event(QEvent *event) override;
|
bool event(QEvent *event) override;
|
||||||
|
void showEvent(QShowEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init();
|
void init();
|
||||||
|
|
Loading…
Reference in New Issue