Save and restore last window position and size.
--HG-- branch : develop
This commit is contained in:
parent
5545eafb6e
commit
33a1454745
|
@ -175,7 +175,6 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
MainWindow w;
|
||||
w.setWindowState(w.windowState() ^ Qt::WindowMaximized);
|
||||
app.setWindowIcon(QIcon(":/icon/64x64/icon64x64.png"));
|
||||
app.setMainWindow(&w);
|
||||
TableWindow table;
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
#include <QSettings>
|
||||
#include <QTimer>
|
||||
#include <QtGlobal>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
|
@ -1920,8 +1921,9 @@ QString MainWindow::strippedName(const QString &fullFileName)
|
|||
*/
|
||||
void MainWindow::ReadSettings()
|
||||
{
|
||||
QPoint pos = qApp->getSettings()->value("pos", QPoint(10, 10)).toPoint();
|
||||
QSize size = qApp->getSettings()->value("size", QSize(1000, 800)).toSize();
|
||||
QRect geomentry = VApplication::desktop()->availableGeometry(this);
|
||||
QPoint pos = qApp->getSettings()->value("pos", geomentry.topLeft()).toPoint();
|
||||
QSize size = qApp->getSettings()->value("size", geomentry.size()).toSize();
|
||||
resize(size);
|
||||
move(pos);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user