user15857247
user15857247

Reputation:

How to make a window in qt be the main focus

So basically i have a class that inherits from QMainWindow and there's a toolbar action in my mainwindow that calls another small window where the user puts in some info, i want the mainwindow inaccessible i.e you shouldn't be able to click on it or interact with it unless you finish what you're doing on that small window or you close the small window. setWindowFlags(Qt::WindowStaysOnTopHint); only makes the small window be on top, but i can still access the MainWindow.

Upvotes: 1

Views: 291

Answers (1)

user15857247
user15857247

Reputation:

Looks like all i needed was the setWindowModality(Qt::ApplicationModal); method

Upvotes: 1

Related Questions