PDA

View Full Version : Change Active Window



TonyInSoMD
26th July 2017, 19:56
I have 2 windows open. I want to programmiticaly make one window be on top and have focus from the other window. I'm calling

window->setWindowState(Qt::WindowActive);
window->setFocus();
but the window I'm calling it from stays in focus. Am I doing something wrong? They are both a QMainWindow

Ginsengelf
27th July 2017, 07:48
Hi, have you tried QWidget::raise?

Ginsengelf