Commit c6144131 authored by Pierre Rossi's avatar Pierre Rossi
Browse files

Split out the example into two distinct ones

Cleaner than deciding on startup with an env variable
Showing with 92 additions and 23 deletions
TEMPLATE = app
TARGET = example
HEADERS = quickwindow.h widgetwindow.h
SOURCES = quickwindow.cpp widgetwindow.cpp main.cpp
OTHER_FILES += quickwindow.qml
INCLUDEPATH += ../lib
INCLUDEPATH += $$absolute_path(../lib, $$PWD)
LIBPATH = $$getOutDir()/$$getConfigDir()/lib
LIBS += -L$$LIBPATH -lQt5WebEngine
QMAKE_RPATHDIR += $$LIBPATH
QT += widgets quick
MOC_DIR=$$PWD
# Quick hack for now as we mess with that for the gyp generation step.
MOC_DIR=$$PWD/.moc
TEMPLATE=subdirs
SUBDIRS += qtquick \
widgets
File moved
File moved
File moved
File moved
......@@ -40,21 +40,10 @@
****************************************************************************/
#include "quickwindow.h"
#include "widgetwindow.h"
#include "qquickwebcontentsview.h"
#include <QApplication>
int mainWidget(int argc, char **argv)
{
QApplication app(argc, argv);
WidgetWindow window;
window.show();
return app.exec();
}
int mainQuick(int argc, char **argv)
int main(int argc, char **argv)
{
QApplication app(argc, argv);
......@@ -64,11 +53,3 @@ int mainQuick(int argc, char **argv)
return app.exec();
}
int main(int argc, char **argv)
{
if (qgetenv("QQUICKWEBENGINE").isNull())
return mainWidget(argc, argv);
else
return mainQuick(argc, argv);
}
TEMPLATE = app
TARGET = qtquick-nano-browser
include(../common.pri)
HEADERS = quickwindow.h
SOURCES = quickwindow.cpp main.cpp
OTHER_FILES += quickwindow.qml
QT += quick \
widgets # QApplication is required to get native styling with QtQuickControls
......@@ -65,5 +65,5 @@ public:
ApplicationEngine::ApplicationEngine()
{
rootContext()->setContextProperty("utils", new Utils(this));
load(QUrl("example/quickwindow.qml"));
load(QUrl("quickwindow.qml"));
}
File moved
File moved
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtWebEngine module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "widgetwindow.h"
#include <QApplication>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
WidgetWindow window;
window.show();
return app.exec();
}
TEMPLATE = app
TARGET = widget-nano-browser
include(../common.pri)
HEADERS = widgetwindow.h
SOURCES = widgetwindow.cpp main.cpp
QT += widgets
File moved
File moved
......@@ -8,7 +8,7 @@ SUBDIRS = shared \
lib \
process \
build \ # This is where we use the generated qt_generated.gypi and run gyp
example \
examples \
# Ninja executable location needs to be determined early for extra targets. Should be fetched from cache most of the time anyway.
NINJA_EXECUTABLE = $$findNinja()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment