add doubleclick titlebar
This commit is contained in:
parent
96d5c572de
commit
1e24fbd300
|
@ -146,3 +146,12 @@ void TitleBar::setGoHomeBtn(bool isable)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TitleBar::mouseDoubleClickEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
if (event->button() == Qt::LeftButton) {
|
||||||
|
toggleMaximize();
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget::mouseDoubleClickEvent(event);
|
||||||
|
}
|
||||||
|
|
|
@ -26,6 +26,8 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void gohomesignal(); // 声明自定义信号
|
void gohomesignal(); // 声明自定义信号
|
||||||
void savePathUpdate(const QString& filePath);
|
void savePathUpdate(const QString& filePath);
|
||||||
|
protected:
|
||||||
|
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||||
private:
|
private:
|
||||||
bool m_ismaximized;
|
bool m_ismaximized;
|
||||||
QToolButton *m_optionbtn = nullptr; // 菜单选项
|
QToolButton *m_optionbtn = nullptr; // 菜单选项
|
||||||
|
|
Loading…
Reference in New Issue