diff options
Diffstat (limited to 'doc/src/snippets')
3 files changed, 49 insertions, 8 deletions
diff --git a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp index f01757a..d2096cf 100644 --- a/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp +++ b/doc/src/snippets/code/src_corelib_io_qfileinfo.cpp @@ -72,9 +72,9 @@ info1.size(); // returns 743 info1.symLinkTarget(); // returns "C:/Pretty++/untabify" QFileInfo info2(info1.symLinkTarget()); -info1.isSymLink(); // returns false -info1.absoluteFilePath(); // returns "C:/Pretty++/untabify" -info1.size(); // returns 63942 +info2.isSymLink(); // returns false +info2.absoluteFilePath(); // returns "C:/Pretty++/untabify" +info2.size(); // returns 63942 #endif //! [1] diff --git a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp index 128799f..8933ef3 100644 --- a/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp +++ b/doc/src/snippets/code/src_corelib_statemachine_qstatemachine.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [simple state machine] QPushButton button; diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml index 29f41bf..97eac45 100644 --- a/doc/src/snippets/declarative/listview/highlight.qml +++ b/doc/src/snippets/declarative/listview/highlight.qml @@ -15,7 +15,7 @@ Rectangle { Item { id: Wrapper width: 180; height: 40 - VerticalLayout { + Column { x: 5; y: 5 Text { text: '<b>Name:</b> ' + name } Text { text: '<b>Number:</b> ' + number } @@ -32,10 +32,10 @@ Rectangle { Rectangle { width: 180; height: 40 color: "lightsteelblue"; radius: 5 - y: Follow { - source: List.current.y + y: SpringFollow { + source: List.currentItem.y spring: 3 - damping: 0.1 + damping: 0.2 } } } @@ -44,7 +44,7 @@ Rectangle { width: parent.height; height: parent.height model: ContactModel; delegate: Delegate highlight: Highlight - autoHighlight: false + highlightFollowsCurrentItem: false focus: true } //! [1] |