Update the default behavior of items with layout
The earlier patchbb104ae537e67chad default behavior as opt-out for size policy of items within the layout. This can cause a lot more UI regressions than anticipated and, so make it as opt-in (Qt::AA_QtQuickUseDefaultSizePolicy). This means that the user needs to explicitly set this attribute to utilize the default size policy of quick items. Amends patch4ae537e67cTask-number: QTBUG-117597 Pick-to: 6.7 Change-Id: Ibdb3ea9897c19792a110cbb15834b27383b9103e Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
parent
dad2a60128
commit
c606739ad1
|
|
@ -422,7 +422,7 @@ namespace Qt {
|
|||
enum ApplicationAttribute
|
||||
{
|
||||
// AA_ImmediateWidgetCreation = 0,
|
||||
AA_QtQuickDontUseDefaultSizePolicy = 1,
|
||||
AA_QtQuickUseDefaultSizePolicy = 1 QT_TECH_PREVIEW_API,
|
||||
AA_DontShowIconsInMenus = 2,
|
||||
AA_NativeWindows = 3,
|
||||
AA_DontCreateNativeWidgetSiblings = 4,
|
||||
|
|
|
|||
|
|
@ -84,10 +84,18 @@
|
|||
QCoreApplication::testAttribute().
|
||||
|
||||
|
||||
\value [since 6.7] AA_QtQuickDontUseDefaultSizePolicy Qt Quick Layouts won't use the built-in
|
||||
size policy of \l Item. This restores previous behavior where all items were fixed size
|
||||
by default. Size policy can be customized by explicitly setting
|
||||
\l{Layout::fillWidth}{Layout.fillWidth} or \l{Layout::fillHeight}{Layout.fillHeight}.
|
||||
\value [since 6.7] AA_QtQuickUseDefaultSizePolicy Qt Quick Layouts use the built-in size
|
||||
policy of \l Item. For example, when this is set, \l Button fills the available
|
||||
width, but has a fixed height. When this is not set, it will use the default
|
||||
sizing behavior of the layout it's in, which is to use its implicit size as the
|
||||
preferred size. This is explained in detail in \l {Specifying preferred size} and
|
||||
\l {Size constraints}. When this is set, the default size policy of the item
|
||||
with the layout can be overridden by explicitly setting
|
||||
\l{Layout::fillWidth}{Layout.fillWidth} or
|
||||
\l{Layout::fillHeight}{Layout.fillHeight}.
|
||||
\b Note: This API is considered tech preview and may change or be removed in future
|
||||
versions of Qt.
|
||||
|
||||
|
||||
\value AA_DontShowIconsInMenus Actions with the Icon property won't be
|
||||
shown in any menus unless specifically set by the
|
||||
|
|
|
|||
Loading…
Reference in New Issue