سؤال

How to set minimum width for the first column of the QFormLayout? I can do it for QGridLayout by using QGridLayout::setColumnMinimumWidth(int, int), but cannot find a method to do that for QFormLayout.

هل كانت مفيدة؟

المحلول 2

How to set minimum width for the first column of the QFormLayout?

You cannot (off-hand). It was not designed for that as this sounds more like a QGridLayout feature. You could either refactor your design to use QGridLayout, or you could potentially set the size for the rows as you wish, but you would execute that on the row content rather than the layout itself.

نصائح أخرى

It's pretty simple to do. Just set a minimum width on any of the widgets that you've inserted into the first column.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top