feat: 启动时默认在屏幕中间
启动时默认在屏幕中间 Log: 位置相关 Change-Id: Ifa7df5fe7bce04dbd38d3b20f6f3ba0775468f5a
This commit is contained in:
parent
3cb047e159
commit
7c66205d3d
|
@ -68,6 +68,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
app->loadTranslator();
|
app->loadTranslator();
|
||||||
|
|
||||||
|
|
||||||
OcrApplication instance;
|
OcrApplication instance;
|
||||||
QDBusConnection dbus = QDBusConnection::sessionBus();
|
QDBusConnection dbus = QDBusConnection::sessionBus();
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
|
|
||||||
#include <DTitlebar>
|
#include <DTitlebar>
|
||||||
|
#include <DWidgetUtil>
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent)
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
: DMainWindow(parent)
|
: DMainWindow(parent)
|
||||||
|
@ -37,6 +39,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
this->setCentralWidget(m_mainWidget);
|
this->setCentralWidget(m_mainWidget);
|
||||||
this->resize(840, 550);
|
this->resize(840, 550);
|
||||||
this->setMinimumSize(840, 550);
|
this->setMinimumSize(840, 550);
|
||||||
|
Dtk::Widget::moveToCenter(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
class MainWidget;
|
class MainWidget;
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
|
|
||||||
class MainWindow : public DMainWindow
|
class MainWindow : public DMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
Loading…
Reference in New Issue
Block a user