diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-06 18:05:00 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-06 18:05:07 +0100 |
commit | 692ff260851575171be6751a7bdf34a744c2ed9d (patch) | |
tree | 67c2ee80fb6a477f731ebc1898a5dfd43c878d2d /examples/quick/shared/LauncherList.qml | |
parent | 8740f35e69dad301eeaa2fc4b74ecab661cdc0c4 (diff) | |
parent | 5cb76fb3704947cfc4d575695b137460ecc8bbd9 (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: I1ed923d72566af663555898c3ec708191eef8ae9
Diffstat (limited to 'examples/quick/shared/LauncherList.qml')
-rw-r--r-- | examples/quick/shared/LauncherList.qml | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/examples/quick/shared/LauncherList.qml b/examples/quick/shared/LauncherList.qml index 2d1d29c585..e532b53e7f 100644 --- a/examples/quick/shared/LauncherList.qml +++ b/examples/quick/shared/LauncherList.qml @@ -1,13 +1,23 @@ /**************************************************************************** ** ** Copyright (C) 2017 Crimson AS <info@crimson.no> -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** 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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 @@ -47,18 +57,11 @@ Rectangle { //function used to add to model A) to enforce scheme B) to allow Qt.resolveUrl in url assignments color: "#eee" - function addExample(name, desc, url) - { + function addExample(name, desc, url) { myModel.append({"name":name, "description":desc, "url":url}) } - - function hideExample() - { - ei.visible = false; - } - function showExample(url) - { - ei.exampleUrl = url; + function showExample(url) { + pageComponent.createObject(pageContainer, { exampleUrl: url }).show() } // The container rectangle here is used to give a nice "feel" when @@ -71,10 +74,7 @@ Rectangle { id: launcherList clip: true delegate: SimpleLauncherDelegate{ - onClicked: { - var page = pageComponent.createObject(pageContainer, { exampleUrl: url }) - page.show() - } + onClicked: showExample(url) } model: ListModel {id:myModel} anchors.fill: parent |