Source

Target

Commits (26)
Showing with 208 additions and 104 deletions
# This file is used to ignore files which are generated in the Qt build system
# ----------------------------------------------------------------------------
examples/quick/controls/ApplicationTemplate/application
examples/quick/controls/text/text
tests/auto/activeFocusOnTab/tst_activeFocusOnTab
tests/auto/controls/tst_controls
......
QT += qml quick widgets
CONFIG += console
TARGET = application
SOURCES += \
main.cpp
OTHER_FILES += \
qml/main.qml
RESOURCES += \
resources.qrc
MOC_DIR = ./.moc
OBJECTS_DIR = ./.obj
UI_DIR = ./.ui
RCC_DIR = ./.rcc
examples/quick/controls/ApplicationTemplate/qml/images/qt_icon.png

6.25 KB

<RCC>
<qresource prefix="/">
<file>qml/main.qml</file>
<file>qml/images/qt_icon.png</file>
</qresource>
</RCC>
QT += qml quick
TARGET = basiclayouts
qtHaveModule(widgets) {
QT += widgets
}
include(src/src.pri)
OTHER_FILES += \
main.qml
RESOURCES += \
resources.qrc
......@@ -53,8 +53,6 @@ ApplicationWindow {
height: mainLayout.implicitHeight + 2 * margin
minimumWidth: mainLayout.Layout.minimumWidth + 2 * margin
minimumHeight: mainLayout.Layout.minimumHeight + 2 * margin
maximumWidth: mainLayout.Layout.maximumWidth + 2 * margin
maximumHeight: mainLayout.Layout.maximumHeight + 2 * margin
ColumnLayout {
id: mainLayout
......@@ -114,7 +112,6 @@ ApplicationWindow {
id: t3
text: "This fills the whole cell"
Layout.minimumHeight: 30
Layout.maximumHeight: 300
Layout.fillHeight: true
Layout.fillWidth: true
}
......
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>main.qml</file>
</qresource>
</RCC>
......@@ -38,29 +38,5 @@
**
****************************************************************************/
#include <QtWidgets/QApplication>
#include <QtQml>
#include <QtQuick/QQuickView>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QQmlEngine engine;
QQmlComponent component(&engine);
component.loadUrl(QUrl("qrc:/qml/main.qml"));
if ( !component.isReady() ) {
qWarning("%s", qPrintable(component.errorString()));
return -1;
}
QObject *topLevel = component.create();
QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
if ( !window ) {
qWarning("Error: Your root item has to be a Window.");
return -1;
}
QObject::connect(&engine, SIGNAL(quit()), &app, SLOT(quit()));
window->show();
return app.exec();
}
#include "../../shared/qt_quick_controls_examplemain.h"
QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
SOURCES += \
$$PWD/main.cpp
......@@ -3,11 +3,10 @@ TEMPLATE = subdirs
SUBDIRS += \
gallery \
splitview \
stackview \
tableview \
touch
touch \
basiclayouts
qtHaveModule(widgets) {
SUBDIRS += text \
ApplicationTemplate
SUBDIRS += text
}
......@@ -242,6 +242,7 @@ Item {
tabOverlap: 16
tabsLeftPadding: 12
frameOverlap: 4
tabsMovable: true
frame: Rectangle {
gradient: Gradient{
......
TEMPLATE = aux
QT += qml quick
TARGET = gallery
qtHaveModule(widgets) {
QT += widgets
}
include(src/src.pri)
OTHER_FILES += \
main.qml \
......@@ -8,3 +14,6 @@ OTHER_FILES += \
content/ModelView.qml \
content/Panel.qml \
content/Styles.qml
RESOURCES += \
resources.qrc
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>content/ChildWindow.qml</file>
<file>content/Controls.qml</file>
<file>content/ImageViewer.qml</file>
<file>content/ModelView.qml</file>
<file>content/Panel.qml</file>
<file>content/Styles.qml</file>
<file>images/document-open.png</file>
<file>images/document-open@2x.png</file>
<file>images/document-save-as.png</file>
<file>images/document-save-as@2x.png</file>
<file>images/folder_new.png</file>
<file>images/page.png</file>
<file>images/tab.png</file>
<file>images/tab_selected.png</file>
<file>images/window-new.png</file>
<file>images/window-new@2x.png</file>
<file>images/panel.png</file>
</qresource>
</RCC>
......@@ -38,49 +38,5 @@
**
****************************************************************************/
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
ApplicationWindow {
width: 640
height: 480
minimumWidth: 400
minimumHeight: 300
menuBar: MenuBar {
Menu {
title: "File"
MenuItem { text: "Quit"; onTriggered: Qt.quit() }
}
Menu {
title: "Help"
MenuItem { text: "About..."; enabled: false }
}
}
toolBar: ToolBar {
RowLayout {
ToolButton { iconSource: "qrc:images/qt_icon.png" }
ToolButton { iconSource: "qrc:images/qt_icon.png" }
}
}
SplitView {
anchors.fill: parent
TableView {
frameVisible: false
highlightOnFocus: false
model: 40
TableViewColumn { title: "Left Column" }
}
TextArea {
frameVisible: false
highlightOnFocus: false
text: "Hello World"
}
}
}
#include "../../shared/qt_quick_controls_examplemain.h"
QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
SOURCES += \
$$PWD/main.cpp
/****************************************************************************
**
** Copyright (C) 2013 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.
**
** $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$
**
****************************************************************************/
#ifndef QT_QUICK_CONTROLS_EXAMPLEMAIN_H
#define QT_QUICK_CONTROLS_EXAMPLEMAIN_H
#include <QtQml>
#include <QtQuick/QQuickView>
#include <QtCore/QString>
#ifndef QT_NO_WIDGETS
#include <QtWidgets/QApplication>
#else
#include <QtGui/QGuiApplication>
#endif
QT_BEGIN_NAMESPACE
#ifndef QT_NO_WIDGETS
#define Application QApplication
#else
#define Application QGuiApplication
#endif
#define QT_QUICK_CONTROLS_EXAMPLE_MAIN(url) \
int main(int argc, char *argv[]) \
{ \
Application app(argc, argv); \
QQmlEngine engine; \
QQmlComponent component(&engine); \
component.loadUrl(QUrl(#url)); \
if ( !component.isReady() ) { \
qWarning("%s", qPrintable(component.errorString())); \
return -1; \
} \
QObject *topLevel = component.create(); \
QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel); \
if ( !window ) { \
qWarning("Error: Your root item has to be a Window."); \
return -1; \
} \
QObject::connect(&engine, SIGNAL(quit()), &app, SLOT(quit())); \
window->show(); \
return app.exec(); \
}
QT_END_NAMESPACE
#endif // QT_QUICK_CONTROLS_EXAMPLEMAIN_H
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>main.qml</file>
</qresource>
</RCC>
TEMPLATE = aux
QT += qml quick
TARGET = splitview
qtHaveModule(widgets) {
QT += widgets
}
include(src/src.pri)
OTHER_FILES += \
main.qml
RESOURCES += \
resources.qrc
/****************************************************************************
**
** Copyright (C) 2013 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.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
** of its contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../../shared/qt_quick_controls_examplemain.h"
QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
SOURCES += \
$$PWD/main.cpp