PDA

View Full Version : QT5 - Modal Window



plvicente
15th January 2020, 09:13
Hello everyone!

I think and i know that are probably tons of questions around this topic.

I have issues on creating modal windows 5 for exactly, to become modal windows.


I want to do it with like setkey ESC to open options, the for set key CTRL+P for profile and so on.

I can't set keys for that. I have the forms and I can't open them as modal windows.

Thanks.

ChrisW67
16th January 2020, 10:06
You open a modal QWidget (Qdialog etc.) by calling its exec() method.

You can assign shortcuts to menu items if these widgets can also be opened from menus.
Also take a look at QShortcut (https://doc.qt.io/qt-5/qshortcut.html#details)