Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt How to change gridlayout column size

Suppose I have a gridlayout of three columns. I want each column to have custom width. Seems to me that the width of the columns are fixed automatically.

How can I do this in the qt designer?

like image 204
Yousuf Azad Avatar asked Nov 21 '22 02:11

Yousuf Azad


1 Answers

You can do it in the QT Designer (GUI)

  1. First, use the Grid Layout widget (say, you want 3 column)
  2. Second, in the Property Editor, choose the layoutColumnStretch and enter value (such as 200,100,100)

Result: 1st column 200px, 2nd column 100px, 3rd column 100px,

like image 123
Lalremruata Khiangte Avatar answered Dec 21 '22 06:12

Lalremruata Khiangte