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;
|
MainWindow w;
|
||||||
w.setWindowState(w.windowState() ^ Qt::WindowMaximized);
|
|
||||||
app.setWindowIcon(QIcon(":/icon/64x64/icon64x64.png"));
|
app.setWindowIcon(QIcon(":/icon/64x64/icon64x64.png"));
|
||||||
app.setMainWindow(&w);
|
app.setMainWindow(&w);
|
||||||
TableWindow table;
|
TableWindow table;
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
#include <QDesktopWidget>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -1920,8 +1921,9 @@ QString MainWindow::strippedName(const QString &fullFileName)
|
||||||
*/
|
*/
|
||||||
void MainWindow::ReadSettings()
|
void MainWindow::ReadSettings()
|
||||||
{
|
{
|
||||||
QPoint pos = qApp->getSettings()->value("pos", QPoint(10, 10)).toPoint();
|
QRect geomentry = VApplication::desktop()->availableGeometry(this);
|
||||||
QSize size = qApp->getSettings()->value("size", QSize(1000, 800)).toSize();
|
QPoint pos = qApp->getSettings()->value("pos", geomentry.topLeft()).toPoint();
|
||||||
|
QSize size = qApp->getSettings()->value("size", geomentry.size()).toSize();
|
||||||
resize(size);
|
resize(size);
|
||||||
move(pos);
|
move(pos);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user