Qt dimension
General and Desktop
5
Posts
2
Posters
1.9k
Views
1
Watching
-
wrote on 19 Jul 2012, 14:10 last edited by
Coming from android, when I work with graphics element like layout, I can express its width and height in relation to its content (wrap_content). It there something like this in Qt? Or the geometry has to be expressed in pixels?
-
Depends whether you talk about QtWidgets or QtQuick UIs. In general - it's pixels. In widgets, when you use layouts, the layout system will calculate everything for you automatically, there is no need to set dimensions explicitly.
-
wrote on 19 Jul 2012, 15:24 last edited by
thank you. I am using stuff like QHBoxLayout, QComboBox, etc. what about it
-
Then it should be done for you automatically :) If the text in text widgets doesn't wrap around, set the "wordWrap" property to true.
-
wrote on 19 Jul 2012, 16:13 last edited by
I will try it. Thank you
1/5