admin管理员组

文章数量:1319953

I'm just getting familiar with qt.

My goal is to have a main window with two tabbed widgets. The content of these tabs should be separated into own .ui files.

I tried to solve this by adding a new ui file based on a QFrame.
Inside the QFrame I put a QVBoxLayout and in that QVBoxLayout I added a table.

In the end it looked like this:

I suppose everything to be the same size. The table view should fit into the VBox and the VBox should expand to the QFrame.

Instead it looks like this (i added a background color to each element):

The table view has the same size like the VBox (green). But it's smaller than the QFrame.

These are the properties of the QFrame:

These are the properties of the QVBoxLayout:

I omit the properties of the QTableView because it has already the correct size (same as parent).
What can I do to expand the QVBoxLayout to the QFrame?

本文标签: qtSet child elements of QFrame to same size like the QFrameStack Overflow