How to show several QTableViews(without scrollbar) in QListWidget(or other similar widgets)?

236 views Asked by At

I have a problem with showing multiple tables(without their own scrollbars) under one scrollbar. Is there any workaround or a good way to resolve this issue in Qt?

1

There are 1 answers

2
AudioBubble On BEST ANSWER

I've tried to do what you ask, and found this. So, here is a solution:

  • add QScrollArea to a form
  • set the property widgetResizable to true
  • put QWidget to scroll area
  • right click on widget -> Set ancestor -> [your scroll area]
  • add vertical layout to a widget
  • scroll area will collapse, epand it with a mouse
  • insert into the widget as many tables as you want
  • set vertical size policy for each table to Minimum and set minimal vertical size.

Here is how it looks:

enter image description here