Fullscreen application on Windows CE 5.0
-
I'm developing a few toy applications on Windows CE 5.0 to see if Qt is the right framework to use for an upcoming project.
The project is going to be an industrial HMI, so I'd like to set up the app like a kiosk - that is, fullscreen, with no window hints or taskbar. Unfortunately, calling QMainWindow::showFullScreen() from the main window's constructor only maximizes the window - it doesn't hide the hints. The taskbar does disappear, but the main window doesn't maximize over it.
@
HMIPrototype::HMIPrototype(QWidget *parent, Qt::WFlags flags)
: QMainWindow(parent, flags)
{
this->showFullScreen();
ui.setupUi(this);
}
@I tried also calling QMainWindow::setWindowFlags(Qt::FramelessWindowHint), but it doesn't appear to have any effect. How can I achieve a true kiosk-like appearance with Qt on WinCE 5.0?
EDIT: So I just tried this:
@
HMIPrototype::HMIPrototype(QWidget *parent, Qt::WFlags flags)
: QMainWindow(parent, flags)
{
this->showFullScreen();
ui.setupUi(this);
this->setWindowFlags(Qt::FramelessWindowHint);
}
@And the hints disappeared! Turned out all I needed to do was call it after ui.SetupUi(). Unfortunately, I still have an ugly gap where the taskbar should be - any ideas?
-
Don't call showFullScreen() in the constructor, call it in your main() function. Or at least move it after setupUi().