tags:

views:

176

answers:

2

I'm using Qt 4.6.3, and ubuntu linux on an embedded target. I call

dlg->setWindowState(Qt::WindowFullScreen);

on my windows in my application (so I don't loose any real-estate on the touch screen to task bar and status panel on the top and bottom of the screen. This all works fine and as expected. The issue comes in when I want to popup the on screen keyboard to allow the user to input some data. I use

m_keyProc= new QProcess();
m_keyProc->start("onboard -s 640x120");

This pops up the keyboard but it is behind the full screen window. The onbaord keyboards preferences are set such that it is always on top, but that seems to actually mean "except for full screen windows". I guess that makes sense and probably meets most use cases, but I need it to be really on top.

Can I either A) Not be full screen mode (so the keyboard works) and programmatically hide the task bars? or B) Force the keyboard to be on top despite my full screen status?

Note: On windows we call

m_keyProc->start("C:\\Windows\\system32\\osk.exe");

and the osk keyboard is on top despite the full screen status. So, I'm guessing this is a difference in window mangers on the different operating systems. So do I need to set some flag on the window with the linux window manager?

+1  A: 

Qt doesn't seem to have a way to bring other, non-Qt process in front. You may need to get the native, platform process ID from QProcess by calling QProcess::pid() and call the underlying OS API to do it.

Stephen Chu
right as i feared. However I'm a bit confused on that. I assume I want to use `XRaiseWindow(Display *display, Window w)` But I how do I determine the window ID to give XRaiseWindow. On windows I'd use `EnumWindows` and `GetWindowText` to find it. I'm not successfully finding the equivalent for xlib.
Lorenz03Tx
I don't know anything about X Window (that's why I am using Qt :) ) but I suspect `XRaiseWindow` only works with the windows in the same process, not windows from other process. I use `SetFrontProcess` on the Mac for this.
Stephen Chu
A: 

Hi Does anyone know how to start the program using QProcess in WinCE? I tried and got the error UnknownError. Thanks, Lwin