diff options
author | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2023-10-17 10:12:21 +0200 |
---|---|---|
committer | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-02-09 10:53:01 +0100 |
commit | 2451ff25a531a2427825726f4b5f015fb01d2663 (patch) | |
tree | ee0993d99b0d2c6de68f0f30bd682bd8766d9adb /src/quick/items/qquicktextinput.cpp | |
parent | 32b5ee7842b8042e3d805209d13a34bb873ee280 (diff) |
Set default layout size policies for quick items
The quick items are initiliazed with default layout size policy.
This size policy can be either Preferred or Fixed and it can vary
depending on controls and its orientation.
[ChangeLog][QtQuick][Item Behavior Changes] The QtQuick items now set
their default size policy and it would be effective when used within
QtQuick Layouts.
The following types now behave differently by default
when used in layouts: Button, CheckBox, ComboBox, Dial, DialogButtonBox,
Frame, Flickable, GridView, GroupBox, HorizontalHeaderView, ListView,
Page, Pane, PathView, ProgressBar, RadioButton, RangeSlider, RoundButton,
ScrollBar, ScrollIndicator, ScrollView, Slider, SpinBox, SplitView,
StackView, SwipeView, Switch, TabBar, TabButton, TableView, TextArea,
TextEdit, TextField, TextInput, ToolButton, TreeView, Tumbler,
VerticalHeaderView.
Task-number: QTBUG-117597
Pick-to: 6.7
Change-Id: I41fe73a2e466e396f26604a14d1f15b8b42df338
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquicktextinput.cpp')
-rw-r--r-- | src/quick/items/qquicktextinput.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 363fa1cbd3..e48e529963 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -2867,6 +2867,7 @@ void QQuickTextInputPrivate::init() } m_inputControl = new QInputControl(QInputControl::LineEdit, q); + setSizePolicy(QLayoutPolicy::Preferred, QLayoutPolicy::Fixed); } void QQuickTextInputPrivate::cancelInput() |