1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix: save position when moving widget

fix #2063
This commit is contained in:
PKev 2015-10-06 16:13:47 +03:00
parent eaf44c45d5
commit 0152937eb4
2 changed files with 11 additions and 0 deletions

View File

@ -451,6 +451,16 @@ Widget* Widget::getInstance()
return instance;
}
void Widget::moveEvent(QMoveEvent *event)
{
if (event->type() == QEvent::Move)
{
saveWindowGeometry();
saveSplitterGeometry();
}
QWidget::moveEvent(event);
}
void Widget::closeEvent(QCloseEvent *event)
{
if (Settings::getInstance().getShowSystemTray() && Settings::getInstance().getCloseToTray() == true)

View File

@ -157,6 +157,7 @@ protected:
virtual void closeEvent(QCloseEvent *event) final override;
virtual void changeEvent(QEvent *event) final override;
virtual void resizeEvent(QResizeEvent *event) final override;
virtual void moveEvent(QMoveEvent *event) final override;
private slots:
void onAddClicked();