Build system changed to Cmake, ORM changed to QxORM, Qt6 compatibility.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "defaultformhandler.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
#include <QScreen>
|
||||
#include <QRect>
|
||||
|
||||
DefaultFormHandler::DefaultFormHandler()
|
||||
@@ -19,7 +19,12 @@ void DefaultFormHandler::showForm(IForm *formWidget)
|
||||
formWidget->onShow();
|
||||
m_dialog->setForm(formWidget);
|
||||
m_dialog->setModal(true);
|
||||
m_dialog->move(QApplication::desktop()->screen()->rect().center() - m_dialog->rect().center());
|
||||
auto screen = m_dialog->screen();
|
||||
|
||||
if (screen) {
|
||||
m_dialog->move(screen->availableGeometry().center() - m_dialog->rect().center());
|
||||
}
|
||||
|
||||
m_dialog->show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user