#include #include #include #include class QtFullscreenBottomWidget : public QWidget { public: QtFullscreenBottomWidget( QWidget *parent = 0 ) : QWidget( parent, Qt::Widget | Qt::WindowStaysOnBottomHint ) { //setWindowFlags( Qt::Window | Qt::WindowStaysOnBottomHint/**/ ); // UINT swpFlags = SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE; // SetWindowPos( (HWND)winId(), HWND_BOTTOM, 0, 0, 0, 0, swpFlags ); setWindowState( Qt::WindowFullScreen ); startTimer(1000); } void keyPressEvent( QKeyEvent *e ) { if ( e->key() == Qt::Key_Escape ) close(); QWidget::keyPressEvent( e ); } void timerEvent( QTimerEvent *e ) { //setWindowFlags( windowFlags() | Qt::WindowStaysOnBottomHint ); UINT swpFlags = SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE; SetWindowPos( (HWND)winId(), HWND_BOTTOM, 0, 0, 0, 0, swpFlags ); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); QtFullscreenBottomWidget w; //w.showFullScreen(); w.show(); return a.exec(); }