[PATCH 2/2] QML preferences: use Layout.preferredHeight within GridLayout

Rick Walsh rickmwalsh at gmail.com
Wed Jan 20 03:47:59 PST 2016


It's not recommended to set the height explicitly of an item in a layout. Use
Layout.preferredHeight instead

Signed-off-by: Rick Walsh <rickmwalsh at gmail.com>
---
 qt-mobile/qml/Preferences.qml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-mobile/qml/Preferences.qml b/qt-mobile/qml/Preferences.qml
index 67f53c0..c8b172b 100644
--- a/qt-mobile/qml/Preferences.qml
+++ b/qt-mobile/qml/Preferences.qml
@@ -56,7 +56,7 @@ GridLayout {
 
 	Item { width: MobileComponents.Units.gridUnit; height: width }
 	Item {
-		height: saveButton.height
+		Layout.preferredHeight: saveButton.height
 		Layout.preferredWidth: saveButton.width
 		SubsurfaceButton {
 			id: saveButton
-- 
2.5.0



More information about the subsurface mailing list