This works, thanks! ...but the return value is always the same!?
Slot in GUI thread:
int overrideQuestion
(const QString fileName
) { }
int overrideQuestion(const QString fileName) {
return QMessageBox::question(this, tr("Override?"), tr("File '%1' already exists! Override?").arg(fileName), QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll);
}
To copy to clipboard, switch view to plain text mode
In copy thread:
signals:
int overrideQuestion
(const QString);
(...)
connect(this,
SIGNAL(overrideQuestion
(QString)), parent,
SLOT(overrideQuestion
(QString)), Qt
::BlockingQueuedConnection);
(...)
int result = emit overrideQuestion(fileInfo.fileName());
signals:
int overrideQuestion(const QString);
(...)
connect(this, SIGNAL(overrideQuestion(QString)), parent, SLOT(overrideQuestion(QString)), Qt::BlockingQueuedConnection);
(...)
int result = emit overrideQuestion(fileInfo.fileName());
To copy to clipboard, switch view to plain text mode
result is always "267386880"!?
Bookmarks