QTableview not fitting the entire dockwidget window
-
hi
Here is a sample that uses a UI and scale with the dock
https://www.dropbox.com/s/6ipc9ap6hjvcpr9/ilovemydocks.zip?dl=0
Maybe it can provide some hint.
Note the UI is widget based for this to work. -
@mrjj
I have changed the list widget to tablewidget and added the header columns.
You can observe that the table fits the entire dock. I have done same thing in my other code also but the table does not fit the entire dock (i have used tableview but i guess it should not matter).
Note: the dock code is same.https://www.dropbox.com/s/c04cuu1yoykbtc6/ilovemydocks.zip?dl=0
-
hi
A note
if u set setFixedSize, it wont be resizeable ?Well the layout are in the UI file. Inserted as the first thing.
It sounds to me that your OTHER code is not using the layout
correctly?The scaling is done via layout and layout is the first thing to insert into
the UI. then the rest of the controls. Matters not which Widgets. All can
be managed by a layout. -
@saitej
well if the layout is applied correctly, you can see at once in Designer that
it works so there must be something wrong.To put the vertical layout, you
right click and go to the layout menu ? -
@saitej said:
super
I can see the error.
You have dragged a layout from left side.
Those are for floating layouts or layout in layout.To apply layout, simply right click the form,
and use the Layout menu. That will scale.
Do not drag from the left. Right click. :)You dont have to remove the red layout. Simply right click outside and apply
layout via the layout menu to the form object. -
@saitej
Np. The drag able layout are a bit non intuitive :)
Note:
If you have a completely new form with no widgets, you must
place 1 widget on form for the right click menu to be active . that
fooled me a lot in the beginning. :)
28/28