Merge branch 'qt6-buttons' of https://github.com/chasonr/NetHack into pr913

This commit is contained in:
nhmall
2022-10-27 22:14:13 -04:00
2 changed files with 8 additions and 0 deletions

View File

@@ -99,7 +99,11 @@ QLayout: Attempting to add QLayout "" to QDialog "", which already has a layout
QGroupBox *box = new QGroupBox("Saved Characters", this);
QVBoxLayout *bgl = new QVBoxLayout();
QButtonGroup *bg = new QButtonGroup();
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect(bg, SIGNAL(idPressed(int)), this, SLOT(done(int)));
#else
connect(bg, SIGNAL(buttonPressed(int)), this, SLOT(done(int)));
#endif
for (int i = 0; saved[i]; ++i) {
QPushButton *b = new QPushButton(saved[i]);
bgl->addWidget(b);

View File

@@ -335,7 +335,11 @@ NetHackQtExtCmdRequestor::NetHackQtExtCmdRequestor(QWidget *parent) :
}
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect(group, SIGNAL(idPressed(int)), this, SLOT(Button(int)));
#else
connect(group, SIGNAL(buttonPressed(int)), this, SLOT(Button(int)));
#endif
bl->activate();
xl->activate();