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