Qt全屏程序

在全平台最稳定的方式:

void setWindowFullscrren( QWidget* window )
{

    QRect screenGeometry = QApplication::desktop()->screenGeometry();

    window ->setFixedSize( screenGeometry.width(), screenGeometry.height() );

    window ->setGeometry( 0, 0, window ->width(), window ->height() );
}

 

你可能感兴趣的:(qt)