产生一个固定大小、禁止最大化、最小化的qquickview窗口
2016-05-24 23:28
766 查看
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
设置DialogQt::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 dialog, it should be launched from another window, or have a parent and used with the QWidget::windowModality property. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input. We refer to a top-level window that has a parent as a secondary window.
固定大小
Qt::MSWindowsFixedSizeDialogHint:
Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs.
带工具栏
Qt::WindowTitleHint:
Gives the window a title bar.
关闭默认的window title
Qt::CustomizeWindowHint:
Turns off the default window title hints.
有一个关闭按钮
Qt::WindowCloseButtonHint:
Adds a close button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
Qt::WindowFlags flag = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint | Qt::WindowSystemMenuHint; pView->setFlags(flag);
稳妥:
相关文章推荐
- 产生一个固定大小、禁止最大化、最小化的qquickview窗口
- SAPUI5 - Component
- [JavaWeb]关于DBUtils中QueryRunner的一些解读.
- [WARNING] [INS-13014] Target environment do not meet some optional requirements.
- guide2datamining阅读笔记(1)
- vue.js+boostrap最佳实践
- UWP 带有header的webrequest请求
- Android基本UI控件运用小例子(3)
- Msql:Incorrect double value: ''for column 'id' at row 1解决
- Android UI设计之RecyclerView
- request获取请求头和请求数据.
- Top K Frequent Elements
- request简介
- ARM64 qemu native build
- iOS开发之高级视图—— UITableView(二)编辑选中行
- android bluetooth蓝牙移植
- AlertDialog.Builder的setCancelable
- Actionscript,AS3,MXML,Flex,Flex Builder,Flash Builder,Flash,AIR,Flash Player之关系
- iOS开发 - 第02篇 - UI进阶 - 06 - PickerView & DatePicker
- 关于UIImage类的对象两种初始化方法的区别