QWizard:更改标题字段的高度/尺寸 [英] QWizard: Change height/dimensions of title field

查看:60
本文介绍了QWizard:更改标题字段的高度/尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试为我正在处理的 Python/Qt 应用程序实现一个简单的第一步"向导.使用 Designer 确实很容易做到这一点,但像往常一样,问题在于细节.我的问题是标题"字段对我来说太大了(可用屏幕空间的约 50%).这是一个屏幕截图那里 *.ui 文件.

I'm currently trying to implement a simple "First steps" Wizard for a Python/Qt application I'm working on. This is really easy to do with Designer, but as usual the devil lies in the details. My problem is that the 'Title' field is way too big for me (~50% of the available screen estate). Here is a screenshot, and there the *.ui-file.

我已经查看了所有 QWizard/QWizardPage 属性,但找不到任何与标题"字段的大小/样式相关的内容.有什么办法可以做到这一点(也许使用自定义样式表?)还是我运气不好?

I've already had a look at all the QWizard/QWizardPage properties and couldn't find anything that referred to the size/styling of the 'Title' field. Is there any way to do this (maybe using a custom stylesheet?) or am I out of luck?

推荐答案

标题标签在内部 QGridLayout 中,除非您向页面添加布局(或明确设置垂直大小页面策略 MinimumExpandingExpanding) 强制包含页面的网格单元展开,标题将始终占据总高度的 50%.

The title label is in an internal QGridLayout, and unless you either add a layout to the page (or explicitly set the vertical size policy of the page to MinimumExpanding or Expanding) to force the grid cell containing the page to expand, the title will always take 50% of the total height.

这篇关于QWizard:更改标题字段的高度/尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆