Do you need this window to be focusable by the user? In other words, do they need to interact with it in some way or is it just a window to display animations?
If interaction is not necessary, you can use WS_EX_NOACTIVATE (on Windows at least). I use the following function for my stuff.
/**
* Set the window to never receive the keyboard focus.
*/
void MyQWidget::setNoActivate() {
long exStyle = GetWindowLong(winId(), GWL_EXSTYLE) | WS_EX_NOACTIVATE;
SetWindowLong(winId(), GWL_EXSTYLE, exStyle);
}
/**
* Set the window to never receive the keyboard focus.
*/
void MyQWidget::setNoActivate() {
long exStyle = GetWindowLong(winId(), GWL_EXSTYLE) | WS_EX_NOACTIVATE;
SetWindowLong(winId(), GWL_EXSTYLE, exStyle);
}
To copy to clipboard, switch view to plain text mode
You will have to include the windows headers.
Bookmarks