Book Image

Application Development with Qt Creator - Second Edition

Book Image

Application Development with Qt Creator - Second Edition

Overview of this book

Table of Contents (20 chapters)
Application Development with Qt Creator Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting the Qt Quick window display options


Qt Quick is great for building applications for non-traditional computing environments, such as set-top boxes or automotive computers. Often, when working with Qt Quick, you'll want an application that doesn't have all the usual windows (such as the close box) around the contents of the window in these settings, because you're trying to present a unified user interface based on your Qt Quick application, rather than the windowing toolkit on the host platform.

You can easily set windows options by editing the main.cpp file in your Qt Quick project. By default, it looks similar to the following code snippet:

#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral(
        "qml/QtTranslucent/main.qml"));
    viewer.showExpanded();

    return app.exec();
}

This code creates a Qt...