Clickable no focus window
I am trying to implement a virtual remote control for my embedded arm 9 application. Focus on widgets can be changed using arrow keys on remote control, hence it seems best idea to post key events on qApp->focusWidget() but focus shifts to remote control as soon as I click on it.
(1) I have made virtual remote control Ui with NoFocus policy but no help.
(2) I tried activating the selected window first before posting key events from virtual remote control, but it always puts focus on first widget on that window.
Is there anyway in Qt, I have virtual remote control window such a way that I can click on it, but focus/activation never shifts to it?
Re: Clickable no focus window
Re: Clickable no focus window
Re: Clickable no focus window
I found a workaround for this by overriding event() for every UI screen in my application and resetting the focus to last focus widget on Activate event. This works, but is not a good design and a kind of hack. This also produces problems in case of controls like combo boxes, I can not select any value in combo box because it closes as soon as the focus is shifted to other window.
The best solution to my prblem seems to have a clickable but no focus window, but I don't know how to do that with Qt. Any pointers are welcome.
Re: Clickable no focus window
I know it's an old thread, but for people who come here via google in the future:
To show a widget without stealing input focus from another do this:
widget->setAttribute(Qt::WA_ShowWithoutActivating);
I created a date editor lineedit descendant which created a frameless calendar widget next to it (setWindowFlags(Qt::FramelessWindowHint)). This works nicely.
Re: Clickable no focus window
I have solution for this, in the case of creating chrome like tab in titlebar. Have a look at this SO page: http://stackoverflow.com/questions/2...in-window?lq=1