comparison widgets/ModelDataTableDialog.cpp @ 1478:d39db4673676 by-id

Fix a number of Qt deprecation warnings
author Chris Cannam
date Wed, 03 Jul 2019 08:55:02 +0100
parents 0ded54e94332
children 9bf8aa2916e9
comparison
equal deleted inserted replaced
1477:0769eaacc6bf 1478:d39db4673676
28 #include <QLabel> 28 #include <QLabel>
29 #include <QGroupBox> 29 #include <QGroupBox>
30 #include <QDialogButtonBox> 30 #include <QDialogButtonBox>
31 #include <QHeaderView> 31 #include <QHeaderView>
32 #include <QApplication> 32 #include <QApplication>
33 #include <QDesktopWidget> 33 #include <QScreen>
34 #include <QAction> 34 #include <QAction>
35 #include <QToolBar> 35 #include <QToolBar>
36 36
37 #include <iostream> 37 #include <iostream>
38 38
142 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Close); 142 QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Close);
143 connect(bb, SIGNAL(rejected()), this, SLOT(close())); 143 connect(bb, SIGNAL(rejected()), this, SLOT(close()));
144 grid->addWidget(bb, 2, 0); 144 grid->addWidget(bb, 2, 0);
145 grid->setRowStretch(2, 0); 145 grid->setRowStretch(2, 0);
146 146
147 QDesktopWidget *desktop = QApplication::desktop(); 147 QScreen *screen = QGuiApplication::primaryScreen();
148 QRect available = desktop->availableGeometry(); 148 QRect available = screen->availableGeometry();
149 149
150 int width = available.width() / 3; 150 int width = available.width() / 3;
151 int height = available.height() / 2; 151 int height = available.height() / 2;
152 if (height < 370) { 152 if (height < 370) {
153 if (available.height() > 500) height = 370; 153 if (available.height() > 500) height = 370;