最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

qt - Set child elements of QFrame to same size like the QFrame - Stack Overflow

programmeradmin0浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论