diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2017-03-01 13:06:44 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2017-03-28 06:17:35 +0000 |
commit | b44048ae27bd916d0eaa1e7d6a5456488ff76f29 (patch) | |
tree | bb00c7612f6baee2dbe0697205a52fd2792e9ee8 /src/imports/controls/doc/snippets | |
parent | a7d9818dd414565cdcc4f4c9415f67735d146c68 (diff) |
AbstractButton: add display property
This property allows control over how icons and text are displayed
within buttons, without having to implement custom delegates. It is
also necessary for the upcoming Action type.
[ChangeLog][Controls][AbstractButton] Added display property to
allow control over how icons and text are displayed within buttons,
without having to implement custom delegates.
Task-number: QTBUG-49820
Change-Id: Ie924e2c54ed49961fd40129999875c8175606ecd
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/doc/snippets')
3 files changed, 103 insertions, 0 deletions
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-icononly.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-icononly.qml new file mode 100644 index 00000000..0a58d4ad --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-icononly.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.9 +import QtQuick.Controls 2.3 + +Button { + icon.source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" + display: Button.IconOnly +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-textbesideicon.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-textbesideicon.qml new file mode 100644 index 00000000..308837f7 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-textbesideicon.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.9 +import QtQuick.Controls 2.3 + +Button { + text: "Button" + icon.source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" + display: Button.TextBesideIcon +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-textonly.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-textonly.qml new file mode 100644 index 00000000..89d335e4 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-textonly.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.9 +import QtQuick.Controls 2.3 + +Button { + text: "Button" + display: Button.TextOnly +} |