当前位置: 首页>>代码示例>>C++>>正文


C++ QWindow::showFullScreen方法代码示例

本文整理汇总了C++中QWindow::showFullScreen方法的典型用法代码示例。如果您正苦于以下问题:C++ QWindow::showFullScreen方法的具体用法?C++ QWindow::showFullScreen怎么用?C++ QWindow::showFullScreen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QWindow的用法示例。


在下文中一共展示了QWindow::showFullScreen方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: keyPressEvent

void CanvasQt::keyPressEvent(QKeyEvent* keyEvent) {
#ifdef USE_QWINDOW
    QWindow* parent = this->parent();
#else
    QWidget* parent = this->parentWidget();
#endif
    if (parent && keyEvent->key() == Qt::Key_F && keyEvent->modifiers() == Qt::ShiftModifier){
        if(parent->windowState() == Qt::WindowFullScreen) {
            parent->showNormal();
        } else {
            parent->showFullScreen();
        }
    }
    KeyboardEvent pressKeyEvent(EventConverterQt::getKeyButton(keyEvent),
                                 EventConverterQt::getModifier(keyEvent),
                                 KeyboardEvent::KEY_STATE_PRESS);

    Canvas::keyPressEvent(&pressKeyEvent);

    if(pressKeyEvent.hasBeenUsed()) {
        keyEvent->accept();
    } else {
        QGLWindow::keyPressEvent(keyEvent);
    }

}
开发者ID:Ojaswi,项目名称:inviwo,代码行数:26,代码来源:canvasqt.cpp

示例2: FullScreenVideoWindow

PlatformVideoWindow::PlatformVideoWindow()
{
    QWindow* win = new FullScreenVideoWindow();
    m_window = win;
    win->setFlags(win->flags() | Qt::FramelessWindowHint);
    // FIXME: Port to Qt 5.
    win->showFullScreen();
    m_videoWindowId = win->winId();
}
开发者ID:jiezh,项目名称:h5vcc,代码行数:9,代码来源:PlatformVideoWindowQt.cpp

示例3: main

int main(int argc, char ** argv)
{
    QSurfaceFormat format = QSurfaceFormat::defaultFormat();
    format.setAlphaBufferSize(8);
    format.setRedBufferSize(8);
    format.setGreenBufferSize(8);
    format.setBlueBufferSize(8);
    QSurfaceFormat::setDefaultFormat(format);

    QGuiApplication app(argc, argv);
    QWindow *window = 0;
    QQmlEngine *engine = 0;
    CodeModel *model = 0;
    model = new CodeModel();

    int exitCode = 0;

    // Want nicer fonts
    qputenv("QT_DF_RANGE",QByteArray("0.15"));
    //qputenv("QML_FIXED_ANIMATION_STEP",QByteArray("1"));

    QQuickView *qxView = new QuintView();
    engine = qxView->engine();
    window = qxView;
    qxView->rootContext()->setContextProperty("codemodel",model);
    qxView->rootContext()->setContextProperty("view",qxView);
    qxView->setSource(QUrl("qrc:/quint.qml"));

    QObject::connect(engine, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));

    app.setOverrideCursor( QCursor( Qt::BlankCursor ) );
    window->showFullScreen();

    exitCode = app.exec();

    delete window;

    return exitCode;
}
开发者ID:sirspudd,项目名称:quint,代码行数:39,代码来源:main.cpp


注:本文中的QWindow::showFullScreen方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。