From d2f21f427fa85ef7b2655b375b7a521a5c4b25c1 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 17 Jan 2014 13:41:27 +0100 Subject: Docs: add a working example to Text::fontSizeMode docs It's easy to miss the maximum bound specified by either the font.pointSize or font.pixelSize properties. Task-number: QTBUG-30005 Change-Id: If1dadebd6673f0e945a1ca95b64521f27d30f5a9 Reviewed-by: Alan Alpert --- src/quick/items/qquicktext.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/quick/items') diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index 038025856c..c9dee9a986 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -2345,6 +2345,10 @@ void QQuickText::setLineHeightMode(LineHeightMode mode) minimumPointSize or minimumPixelSize property and maximum bound specified by either the \l font.pointSize or \l font.pixelSize properties. + \qml + Text { text: "Hello"; fontSizeMode: Text.Fit; minimumPixelSize: 10; font.pixelSize: 72 } + \endqml + If the text does not fit within the item bounds with the minimum font size the text will be elided as per the \l elide property. */ -- cgit v1.2.3 From fc218a91ce03187f51058deba9d5cdde9c3e6d05 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 28 Jan 2014 08:59:59 -0600 Subject: Fix crash in header when regenerating view. Unregister for geometry changes before reparenting, as reparenting may trigger those changes. Task-number: QTBUG-36481 Change-Id: Ia94f1f88880b232dd583b7e63e5da73fb338f7c6 Reviewed-by: Martin Jones --- src/quick/items/qquickitemview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp index d7b984788e..5d6fc534b4 100644 --- a/src/quick/items/qquickitemview.cpp +++ b/src/quick/items/qquickitemview.cpp @@ -66,6 +66,7 @@ FxViewItem::~FxViewItem() { delete transitionableItem; if (ownItem && item) { + trackGeometry(false); item->setParentItem(0); item->deleteLater(); item = 0; -- cgit v1.2.3 From c160190a6faed125d7ada130a28583b7d5861441 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Thu, 6 Feb 2014 22:09:03 +0800 Subject: Doc: Merge duplicated example directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit examples/quick/customitems contains all the examples found in examples/quick/ui-components, plus 2 more (maskedmousearea and painteditem). There are some very minor differences between the duplicated files, regarding the "smooth" property. Apart from that, the examples are identical. The only file that is unique to examples/quick/ui-components is example-slideswitch.qdoc. Moving it does not change the generated HTML filename. The other examples do not produce any documentation. Change-Id: I507d9064a60fd1f3a1469c1e423d4c0a72c7dc41 Reviewed-by: Topi Reiniƶ --- src/quick/items/qquickflickable.cpp | 2 +- src/quick/items/qquickflipable.cpp | 2 +- src/quick/items/qquicktranslate.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index ec199a5a9b..789d1952c0 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -665,7 +665,7 @@ is finished. \dots 8 \snippet qml/flickableScrollbar.qml 1 - \sa {declarative/ui-components/scrollbar}{scrollbar example} + \sa {declarative/customitems/scrollbar}{scrollbar example} */ QQuickFlickable::QQuickFlickable(QQuickItem *parent) : QQuickItem(*(new QQuickFlickablePrivate), parent) diff --git a/src/quick/items/qquickflipable.cpp b/src/quick/items/qquickflipable.cpp index 15ebf776aa..1ea5e57656 100644 --- a/src/quick/items/qquickflipable.cpp +++ b/src/quick/items/qquickflipable.cpp @@ -127,7 +127,7 @@ public: state, and \l {Animation and Transitions in Qt Quick} for more information on how animations work within transitions. - \sa {declarative/ui-components/flipable}{Flipable example} + \sa {declarative/customitems/flipable}{Flipable example} */ QQuickFlipable::QQuickFlipable(QQuickItem *parent) : QQuickItem(*(new QQuickFlipablePrivate), parent) diff --git a/src/quick/items/qquicktranslate.cpp b/src/quick/items/qquicktranslate.cpp index f1b716cf5b..20eb1dce5b 100644 --- a/src/quick/items/qquicktranslate.cpp +++ b/src/quick/items/qquicktranslate.cpp @@ -336,7 +336,7 @@ public: \image axisrotation.png - \sa {declarative/ui-components/dialcontrol}{Dial Control example}, {Qt Quick Demo - Clocks} + \sa {declarative/customitems/dialcontrol}{Dial Control example}, {Qt Quick Demo - Clocks} */ QQuickRotation::QQuickRotation(QObject *parent) : QQuickTransform(*new QQuickRotationPrivate, parent) -- cgit v1.2.3 From 8efc7c190b7cd57c3285ba8fcb9e17ea8f4717c2 Mon Sep 17 00:00:00 2001 From: John Brooks Date: Sun, 9 Feb 2014 02:34:25 -0700 Subject: Fix origin for short reversed item views Reversed (BottomToTop and RightToLeft) item views would report an impossible positive value for origin when contentHeight < height. The correct value will be effectively equivalent to the position of the footer, and always negative. Match other logic using lastPosition() by negating its value for reversed views. This fixes a bug with content disappearing in a Controls ScrollView on a BottomToTop view. Change-Id: Ieedbb64ce8fc7c0fb36e5256e437ddeb3e757761 Reviewed-by: Martin Jones --- src/quick/items/qquickitemview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp index 5d6fc534b4..e5b2ee822c 100644 --- a/src/quick/items/qquickitemview.cpp +++ b/src/quick/items/qquickitemview.cpp @@ -1381,7 +1381,7 @@ qreal QQuickItemView::originX() const if (d->layoutOrientation() == Qt::Horizontal && effectiveLayoutDirection() == Qt::RightToLeft && contentWidth() < width()) { - return d->lastPosition() - d->footerSize(); + return -d->lastPosition() - d->footerSize(); } return QQuickFlickable::originX(); } @@ -1392,7 +1392,7 @@ qreal QQuickItemView::originY() const if (d->layoutOrientation() == Qt::Vertical && d->verticalLayoutDirection == QQuickItemView::BottomToTop && contentHeight() < height()) { - return d->lastPosition() - d->footerSize(); + return -d->lastPosition() - d->footerSize(); } return QQuickFlickable::originY(); } -- cgit v1.2.3 From 6c840c70d61c3ae277b60a024a086215c743e5b3 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 29 Jan 2014 17:23:23 +0100 Subject: Warn when attaching Keys to an invalid item Using Window { Keys.onPressed: ... } does not work because window is not a QQuickItem. Warn at least. Change-Id: Ibd472f7b551ff2089cbc39ba43da27e6f8e0e97f Reviewed-by: Mitch Curtis Reviewed-by: Caroline Chao Reviewed-by: Jens Bache-Wiig --- src/quick/items/qquickitem.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 5739d6874e..88ffc7bba3 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -1202,6 +1202,8 @@ QQuickKeysAttached::QQuickKeysAttached(QObject *parent) Q_D(QQuickKeysAttached); m_processPost = false; d->item = qmlobject_cast(parent); + if (d->item != parent) + qWarning() << "Could not attach Keys property to: " << parent << " is not an Item"; } QQuickKeysAttached::~QQuickKeysAttached() -- cgit v1.2.3