[Qt-interest] how can make window full-screen?
John McClurkin
jwm at nei.nih.gov
Fri Apr 30 14:31:27 CEST 2010
Meir Yanovich wrote:
> hello all
> i like to make my application window to real full screen
> what is the best way to do it ?
> i did try :ui.centralwidget->showFullScreen();
> but without any lock
/* Get the size of the screen */
QDesktopWidget *desktop = QApplication::desktop();
int screenWidth = desktop->width();
int screenHeight = desktop->height();
/* create the main window and resize */
QWidget *mainWin = new Mainwindow();
mainWin->resize(screenWidth, screenHeight);
/* go to full screen */
mainWin->setWindowState(mainWin->windowState() |
Qt::WindowFullScreen);
More information about the Qt-interest-old
mailing list