Ashish
Ashish

Reputation: 249

Return value of Qdialog execution

I am calling a QDialog on a click event of a QPushButton. I want to execute that dialog as a Qt::Sheet or Qt::Drawer. For this i am using exec()

int Qdialog::exec();

method but it executes it as a popup dialog instead of Qt::Sheet or Qt::Drawer. I have also tried show method,

void Qdialog::show();

it works fine but here my problem is, its return type is void and my further working depends on its return type like exec() method. thanks.

Upvotes: 0

Views: 314

Answers (1)

thuga
thuga

Reputation: 12931

Using show() will not block, that is why it can't return anything. QDialog has a finished signal which has the result as an argument. You can use that to get the result after calling show().

Upvotes: 3

Related Questions