mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
qt, test: Recognize dialog object by name
This commit is contained in:
@@ -418,7 +418,7 @@ void TestGUIWatchOnly(interfaces::Node& node, TestChain100Setup& test)
|
||||
timer.setInterval(500);
|
||||
QObject::connect(&timer, &QTimer::timeout, [&](){
|
||||
for (QWidget* widget : QApplication::topLevelWidgets()) {
|
||||
if (widget->inherits("QMessageBox")) {
|
||||
if (widget->inherits("QMessageBox") && widget->objectName().compare("psbt_copied_message") == 0) {
|
||||
QMessageBox* dialog = qobject_cast<QMessageBox*>(widget);
|
||||
QAbstractButton* button = dialog->button(QMessageBox::Discard);
|
||||
button->setEnabled(true);
|
||||
|
||||
Reference in New Issue
Block a user