如何全屏QGLWidget? [英] How to fullscreen a QGLWidget?

查看:113
本文介绍了如何全屏QGLWidget?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的OpenGL和Qt,我正在同时学习(3天已经:)。我几年前我​​做了一些试验DirectX和我清楚地记得,有可能做一个全屏幕窗口。全屏我的意思是真的全屏,即使没有顶部,你有全屏和最小化按钮。

I am new to OpenGL and Qt, and I am learning both simultaneously(3 days already:). I couple of years ago I did some exmerimenting with DirectX and I clearly remember that it was possible to make a full-screen window there. By full-screen I mean really full-screen, even without the top part where you have the close fullscreen and minimize buttons.

我有这个程序到目前为止:

I have this program so far:

#include <QApplication>

int main(int argc, char** argv)
{
    QApplication app(argc, argv);
    QGLWidget w;
    w.show();
    return app.exec();
}

我应该添加什么来使w全屏?

What should I add to it to make w full-screen?

推荐答案

showFullScreen()

虽然我不想只说RTFM - Qt在线文档真的很棒。

Although I don't want to just say RTFM - the Qt online documentation really is excellent.

这篇关于如何全屏QGLWidget?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆