diff options
Diffstat (limited to 'examples/quick/controls/tableview/src/main.cpp')
-rw-r--r-- | examples/quick/controls/tableview/src/main.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/quick/controls/tableview/src/main.cpp b/examples/quick/controls/tableview/src/main.cpp index a757f485..1406b84c 100644 --- a/examples/quick/controls/tableview/src/main.cpp +++ b/examples/quick/controls/tableview/src/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. @@ -39,11 +39,21 @@ ****************************************************************************/ #include "qtquickcontrolsapplication.h" -#include <QtQml/QQmlApplicationEngine> +#include "sortfilterproxymodel.h" +#include <QtQml/qqmlapplicationengine.h> +#include <QtGui/qsurfaceformat.h> +#include <QtQml/qqml.h> int main(int argc, char *argv[]) { QtQuickControlsApplication app(argc, argv); + if (QCoreApplication::arguments().contains(QLatin1String("--coreprofile"))) { + QSurfaceFormat fmt; + fmt.setVersion(4, 4); + fmt.setProfile(QSurfaceFormat::CoreProfile); + QSurfaceFormat::setDefaultFormat(fmt); + } + qmlRegisterType<SortFilterProxyModel>("org.qtproject.example", 1, 0, "SortFilterProxyModel"); QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); return app.exec(); } |