Qt 5.6 的 Qt.labs.controls 在安卓上效果
来源:互联网 发布:excel编程用什么语言 编辑:程序博客网 时间:2024/06/04 23:34
Qt 5.6 的 Qt.labs.controls 在安卓上效果
Qt 5.6 发布也有一段时间了。其中的 QtQuick.Controls 2.0
也以技术预览的方式发布出来。
这里给大家一睹为快。
测试代码如下:
import QtQuick 2.6import QtQuick.Window 2.2import Qt.labs.controls 1.0import QtQuick.Layouts 1.3ApplicationWindow { id: mainWindow visible: true width: 360 height: 640 // font.pointSize: 20 起步 font.pointSize: slider.value * 50 Drawer { //edge: Qt.TopEdge Rectangle { width: mainWindow.width * 0.8 height: mainWindow.height color: "red" } } SwipeView { id: view anchors.fill: parent currentIndex: 2 Item { id: firstPage ButtonGroup { buttons: column.children } Column { id: column RadioButton { checked: true text: qsTr("DAB") } RadioButton { text: qsTr("FM") } RadioButton { text: qsTr("AM") } } } Item { id: secondPage Button { text: "Button" } } Item { id: thirdPage Flow { width: parent.width height: parent.height Switch { text: qsTr("Wi-Fi") } RangeSlider { first.value: 0.25 second.value: 0.75 } CheckBox { checked: true text: qsTr("First") } Button { text: "Button" onClicked: { } } Dial { Keys.onLeftPressed: {} } Frame { ColumnLayout { anchors.fill: parent CheckBox { text: qsTr("E-mail") } CheckBox { text: qsTr("Calendar") } CheckBox { text: qsTr("Contacts") } } } ProgressBar { value: 0.5 } Label { text: mainWindow.font.pixelSize+ "," + mainWindow.font.pointSize } Slider { id: slider value: 0.5 width: parent.width } } } } PageIndicator { id: indicator count: view.count currentIndex: view.currentIndex anchors.bottom: view.bottom anchors.horizontalCenter: parent.horizontalCenter }}
在 Window 7 上测试时,抽屉( Drawer
)控件是有效的,但是在安卓上就无法拖出抽屉控件。控件风格默认以灰色为主格调。
在安卓下的效果:
可以看出,默认的控件在安卓上,大小偏小。
通过设置 ApplicationWindow::font.pointSize
来控制控件中字体的大小。
字体大小改变了,但是控件本身没有变动。看来还得多段时间的发展。
此外,在 Window 7 上测试代码时,如果使用 BusyIndicator
或者 ComboBox
有一定概率无法退出程序,或者程序会奔溃。
0 0
- Qt 5.6 的 Qt.labs.controls 在安卓上效果
- Qt Labs
- Qt Quick Controls模块
- 使用Qt.labs.settings来存储应用的设置
- 在 QT 程序里使用Vista的 Glass 背景效果
- Qt下的透明效果
- Qt下的透明效果
- Qt 示例学习--2. calendar quick controls
- Qt 示例学习--3 gallery quick controls
- 在Qt使用moveToThread() qt的线程
- Qt 学习之路 2(83):Qt Quick Controls
- QT开发(五十五)———Qt Quick Controls
- Qt 学习之路 2(83):Qt Quick Controls
- Qt动画效果的幕后英雄:QTimeLine
- QT下的几种透明效果
- Qt动画效果的幕后英雄:QTimeLine
- Qt动画效果的幕后英雄:QTimeLine
- QT下的几种透明效果
- 枚举+dijkstra(最短路删点) hdu5137How Many Maos Does the Guanxi Worth
- JeeSite(2):导入数据,进入系统
- 抽象类与接口的区别
- python获取ipv6地址
- 使用 Flume 部署和管理可扩展的 Web 服务
- Qt 5.6 的 Qt.labs.controls 在安卓上效果
- iOS给客户打包ipa 文件
- enq: TX - row lock contention 等待事件
- 成功搭建OSB环境并运行HelloWorld项目(代码,视频)
- php常用的正则表达式
- 如何利用@font-face完成个性化字体
- #与##在宏定义中的--宏展开
- java默认事务级别read committed对binlog_format的需求
- js 闭包作用