产生一个固定大小、禁止最大化、最小化的qquickview窗口

QQuickView 默认窗口可能包含最大化和最小化按钮,通过设置Qt::Dialog及相关窗口标志可以创建固定大小且无这些功能的对话框。使用Qt::Dialog、Qt::MSWindowsFixedSizeDialogHint、Qt::WindowTitleHint、Qt::CustomizeWindowHint和Qt::WindowCloseButtonHint等标志,可以定制窗口外观,去除帮助按钮并确保只显示关闭按钮。
摘要由CSDN通过智能技术生成

QQuickView

官方描述:
The QQuickView class provides a window for displaying a Qt Quick user interface.

This is a convenience subclass of QQuickWindow which will automatically load and display a QML scene when given the URL of the main source file. Alternatively, you can instantiate your own objects using QQmlComponent and place them in a manually setup QQuickWindow.

默认的qquickview产生的窗口是这样的:
这里写图片描述

所以就需要我们设置点什么了。

但是突然发现,怎么折腾没啥用。

后来,索性设置为dialog吧!

但是单词的dialog还是有问题,会出现一个万恶的?(帮助)按钮。

设置flags

设置Dialog
Qt::Dialog:
Indicates that the widget is a window that should be decorated as a dialog (i.e., typically no maximize or minimize buttons in the title bar). This is the default type for QDialog. If you want to use it as a modal dial

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一苇渡江694

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值