V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
anzu
V2EX  ›  Qt

为什么 ListView 没有随窗口大小自适应缩放?

  •  
  •   anzu · 2021-11-08 17:10:29 +08:00 · 795 次点击
    这是一个创建于 893 天前的主题,其中的信息可能已经有所发展或是发生改变。
    纯萌新,系统 Linux ,窗口管理器 i3 。
    截图:
    https://imgur.com/a/EoN3wsX
    anzu
        1
    anzu  
    OP
       2021-11-08 17:39:17 +08:00
    我懂了。QMainWindow 有一个无法在 QT Designer 中删除的 CentralWidget ,需要在代码中设置:
    ui->centralwidget->setLayout(mainLayout);
    坑呐。
    结贴。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2855 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:29 · PVG 22:29 · LAX 07:29 · JFK 10:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.