0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-30 21:07:12 +03:00

Qt6 support added

This commit is contained in:
fralx
2021-01-20 14:47:05 +03:00
parent e3356a3d00
commit 81f27782be
39 changed files with 759 additions and 204 deletions

View File

@@ -3,7 +3,12 @@
#include <QSqlDatabase>
#include <QDir>
#include <QDebug>
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 3)
#include <QDesktopWidget>
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3)
#include <QScreen>
#endif
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
@@ -40,11 +45,14 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->actionOne_to_One, SIGNAL(triggered()), this, SLOT(slotOneToOne()));
initPercentCombobox();
enableUI(false);
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3)
int screenWidth = QGuiApplication::primaryScreen()->geometry().width();
int screenHeight = QGuiApplication::primaryScreen()->geometry().height();
#else
QDesktopWidget *desktop = QApplication::desktop();
int screenWidth = desktop->screenGeometry().width();
int screenHeight = desktop->screenGeometry().height();
#endif
int x = screenWidth*0.1;
int y = screenHeight*0.1;