You can always use the SendMessage() WinAPI call to deliver a custom message to another application and then you can catch that message there and use raise() and setActiveWindow() (or whatever other combination you find useful).
You can always use the SendMessage() WinAPI call to deliver a custom message to another application and then you can catch that message there and use raise() and setActiveWindow() (or whatever other combination you find useful).
I have exactly such implementation with SendMessage() as you say.
But raise() and activateWindow() and many others WinAPI calls did not worked!
Yesterday, i have found the problem.
It used AllowSetForegroundWindow() call which made the raise() call work. I think it was because raise() is implemented through SetForegroundWindow() API.
Thanks to all.
mainDialog->activateWindow()
mainDialog->raise()
PS: Problem is resolved
can u put some example code of how exactly u did it..?
Try this it might be helps you.
this->stackUnder(parentWidget()); [this means is your QMainWindow]
I used the following code to make a PyQt4 window the topmost window and to bring it to the front (in front of all other windows) in a Windows 10 64 bit environment:
self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint )
# The following is drawn from: https://stackoverflow.com/questions/...p-to-the-front
# the following will remove minimized status
# and restore window with keeping maximized/normal state
self.setWindowState(self.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
# this will activate the window
self.activateWindow()
Bookmarks