| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Mention what happens if its contentItem has no implicit size and only
one child item.
Change-Id: I646ca2baad89ac195836268b14108b43beaec2bf
Fixes: QTBUG-69096
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current documentation says:
"All controls, except non-interactive indicators,
do not let clicks and touches through to items below them.
For example, if Pane is used as the header or footer of
ApplicationWindow, items underneath it will not get mouse
or touch events."
This can be confusing, because a Pane declared as a child
of a MouseArea is "below" the MouseArea in code, but is
"above" the MouseArea in the scene.
Add a code example to make it less ambiguous.
Also, link to the Event Handling section from Pane's docs.
Task-number: QTBUG-71735
Change-Id: I97f4d6501af410bd5d5c0c0e48b14ca65605357d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/quicktemplates2/qquickabstractbutton_p_p.h
src/quicktemplates2/qquickcombobox.cpp
src/quicktemplates2/qquickcontainer.cpp
src/quicktemplates2/qquickcontrol.cpp
src/quicktemplates2/qquickcontrol_p_p.h
src/quicktemplates2/qquickdialog_p_p.h
src/quicktemplates2/qquickdialogbuttonbox.cpp
src/quicktemplates2/qquickdialogbuttonbox_p_p.h
src/quicktemplates2/qquickdrawer.cpp
src/quicktemplates2/qquickmenubar.cpp
src/quicktemplates2/qquickmenubar_p_p.h
src/quicktemplates2/qquickpage.cpp
src/quicktemplates2/qquickpage_p_p.h
src/quicktemplates2/qquickpane.cpp
src/quicktemplates2/qquickpane_p_p.h
src/quicktemplates2/qquickpopup.cpp
src/quicktemplates2/qquickpopup_p_p.h
src/quicktemplates2/qquickrangeslider.cpp
src/quicktemplates2/qquickscrollview.cpp
src/quicktemplates2/qquickslider.cpp
src/quicktemplates2/qquickspinbox.cpp
src/quicktemplates2/qquickswipeview.cpp
src/quicktemplates2/qquicktabbar.cpp
src/quicktemplates2/qquicktextarea_p_p.h
src/quicktemplates2/qquicktextfield_p_p.h
src/quicktemplates2/qquicktheme_p.h
Change-Id: I6e2b8fe99e51e3e26c87546aa66af045bc429ec4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code is more readable and less error-prone (this patch caught a few
uninitialized members) when the members are initialized in the same
place where they are declared. In many cases, empty default destructors
can be entirely removed, and we get faster implicitly declared inline
default constructors defined by the compiler.
Change-Id: I14c5448afc901f9b2ac5965f28c1c26c0b646c08
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][Controls][Control] Added implicitContentWidth and
implicitContentHeight properties that can be used to simplify
complex implicit size bindings.
Change-Id: I6ccef572c013605058808ce2ad17f8bd82f49ef0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][Controls][Control] Added implicitBackgroundWidth and
implicitBackgroundHeight properties that can be used to simplify
complex implicit size bindings.
Task-number: QTBUG-60156
Change-Id: Ia68df187c2a458c84de19f867d76a643134e8b69
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ia32f3004cf540f995344286683d754558369f279
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows us to remove duplicate properties, and ScrollView gets
Pane's automatic content size calculation, which allows us to remove
the respective QML bindings.
Change-Id: I96ba98c12d0bf294f19b2c2b3617bfc88326bb41
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
A follow up commit to 6fcfb8d. This is a preparation step to make
QQuickPane a suitable base class for QQuickScrollView.
Change-Id: I98cda1a03a93ee31676b79c2542cce61075392f5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Hide QQmlListProperty, which is close to unusable in C++, from the
templates C++ API.
Change-Id: I9720fc3297fc625076a8a7553245852b641bc65a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
a064824 added QQuickContentItem to provide more useful debug output.
This improves the debug output further by providing the correct QML
type name for types inherited from Pane and Popup, such as Frame and
Dialog.
With:
ApplicationWindow {
Pane { Component.onCompleted: console.log(contentItem) }
Frame { Component.onCompleted: console.log(contentItem) }
Popup { Component.onCompleted: console.log(contentItem) }
Dialog { Component.onCompleted: console.log(contentItem) }
Component.onCompleted: console.log(contentItem)
}
Before:
qml: QQuickContentItem(0x7fa3397cfa70, "ApplicationWindow")
qml: QQuickContentItem(0x7fa3397d6f10, "Popup")
qml: QQuickContentItem(0x7fa3397d3f00, "Popup")
qml: QQuickContentItem(0x7fa339534990, "Pane")
qml: QQuickContentItem(0x7fa339534e40, "Pane")
After:
qml: QQuickContentItem(0x7fbebfce3210, "ApplicationWindow")
qml: QQuickContentItem(0x7fbebfcea790, "Dialog")
qml: QQuickContentItem(0x7fbebfce7730, "Popup")
qml: QQuickContentItem(0x7fbebfcf61d0, "Frame")
qml: QQuickContentItem(0x7fbebfcf4d20, "Pane")
Change-Id: Ie8ab2b0c576f3bda7edf9840f7d030d3eef383f3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The previous commit made it possible to avoid passing the content item
around to calculate the current content size.
Change-Id: I8e7713d5fe10d420461c37607cf2e4f5d8c1651c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With the following code:
ApplicationWindow {
Component.onCompleted: print(contentItem)
}
Before:
QQuickItem(0x16043e52600)
After:
QQuickContentItem(0x28a89b96440, "ApplicationWindow")
QQuickWindow has a similar concept (QQuickRootItem).
Change-Id: I6504b62c69cfd7d9036d5c200a65542b953bc7bc
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Caused by 87dec64. Previously, the bindings were:
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
That is, if contentItem does not have implicit size, Pane uses the
implicit size of the first content child (if there's one). When the
new automatic content size calculation was implemented, I forgot to
install a listener on the content child (in addition to contentItem).
Consequently, if the imlicit size of the first content child changed
after construction, the content size was not updated as appropriate.
Change-Id: Ib3d81f4e08a4d0822849d5db12429a2dd036e206
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Id5cd236e14238612647f7a897886be0202863132
|
| |
| |
| |
| |
| |
| |
| |
| | |
This will list each control that is a focus scope, and have
some relevant information about focus in Qt Quick Controls 2.
Change-Id: I3126452bf73f7d7730d0522d616d61ad0da0dd74
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
No more need for the clumsy and slow contentWidth and contentHeight
bindings in Pane and its derivatives.
QmlBench on TX1:
Pane: 26.4 -> 32.8 frames (~24%)
Frame: 25.4 -> 31 frames (~22%)
GroupBox: 28.6 -> 32 frames (~12%)
Change-Id: I4ba1d46ba6328de2ee0955c241d4b090127f6b85
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
Tumbler is excluded because test_customContentItemAtConstruction()
starts failing if deferred execution is enabled for the content item.
Task-number: QTBUG-50992
Change-Id: I11022c3c380311396453cf6229e068e4aae2d82a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-50992
Change-Id: I6372e143c68f0a5bf7212d759281acef3c81618e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-50992
Change-Id: Ibba0e79f8eaf76336dad3708606484a2846b2912
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When no content item is explicitly assigned, container type of controls
(Page, Pane, Popup...) create a default content item on demand. Notice
that the content item is created from within the contentItem() getter,
so it must not emit contentItemChanged() to avoid binding loops.
QQuickControl::setContentItem_helper() was introduced in 1eaebd0 to
mitigate basically the same problem with QQuickScrollView, which has
its own special lazy creation of a Flickable content item.
Now, the problem is that the other container controls are not executing
setContentItem_helper(), because they have already assigned contentItem
and therefore it returns right away. Fix the issue by returning the new
content item without assigning it to let setContentItem_helper() do its
job. The issue was spotted while debugging QTBUG-61434.
Change-Id: Id6f84748ec08bbdfd3bd934dda627e2619af7d2a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, if you have a floating button on top of a text editor,
hovering the button must change the cursor from the editor's ibeam
cursor to an arrow cursor. This applies to all interactive controls
that call setAcceptedMouseButtons(). If a control blocks mouse events,
it should not use some random cursor from another control underneath.
Task-number: QTBUG-59629
Change-Id: I8a6ae306bbc76a9b22377361cb19cf9c3a872d31
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I03deebff661746d49e537af5b1c8899b938efb0d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It was a bit inconsistent before. Admittedly the colon at the end
was the most commonly used style in the quicktemplates2 code base,
but some had a line-break before the colon. This is now chosen as
the one true coding style of QQC2. ;) It makes the initializer list
aligned so that it stands out from the constructor body.
Change-Id: I66835e088df90d7219af04915176006d2a934ddc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Initialize one member per line. Allow empty constructors with one
initialized member on a single line.
Change-Id: Ie115802561ebd19efd4dacda1fa868b64d279109
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existence of a content item is obligatory for such controls that
alias the contentData and contentChildren properties to the data and
children properties of the content item.
Even though we created empty content items in QML to ensure one always
exists, it did not not guarantee that a content item would exist for
custom styles. Furthermore, the empty content item was unnecessarily
created and destroyed when the property was overridden for a customized
control in QML.
This change creates the content item lazily where required, ensuring
that it always exists even for custom styles, but does not create it
in case a content item is supplied from QML.
Task-number: QTBUG-54347
Task-number: QTBUG-56038
Change-Id: I714ef4f8c366f0f449b922b2c16c0ec653fbd364
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Change-Id: I59b40f68aa1f2985bfc15de26f587df6a88c09eb
Task-number: QTBUG-55904
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
| |
Change-Id: Ie4680c5dfadc95278215b688f4fc28577f557933
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
|
|
|
|
| |
Change-Id: I5b0015476c3ceef8f82b00d99b084b1ce3bfaa6f
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
| |
Change-Id: Id6c476424fa359d222f027584278346fc0984069
Task-number: QTBUG-52549
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
| |
This file is part of the Qt Quick Templates 2 module of the Qt Toolkit.
Change-Id: I39ef9cbb00f55a32b7a43f11ffbdfbb40b84e124
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ib8050cb3baefe07d28c7e2dcec64af155d2d7c9b
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|