使用Ubuntu DatePicker来选择时间
来源:互联网 发布:手机直播软件排名 编辑:程序博客网 时间:2024/05/29 15:29
我们在Ubuntu QML应用设计中,我们可以使用DatePicker来选择我们所需要的时间。在这里,我们主要利用在Ubuntu API网站介绍的资料来做一个demo来显示到底是什么一个东西。
import QtQuick 2.0import Ubuntu.Components 1.1import Ubuntu.Components.Pickers 1.0/*! \brief MainView with a Label and Button elements.*/MainView { // objectName for functional testing purposes (autopilot-qt5) objectName: "mainView" // Note! applicationName needs to match the "name" field of the click manifest applicationName: "datapicker.liu-xiao-guo" /* This property enables the application to change orientation when the device is rotated. The default is false. */ //automaticOrientation: true // Removes the old toolbar and enables new features of the new header. useDeprecatedToolbar: false width: units.gu(60) height: units.gu(85) Page { title: i18n.tr("datapicker") Flickable { anchors.fill: parent contentHeight: content.childrenRect.height Column { id: content anchors.centerIn: parent spacing: units.gu(1) Label { text: "Selected date: W" + datePicker.week + " - " + Qt.formatDate(datePicker.date, "dddd, dd-MMMM-yyyy") } DatePicker { id: datePicker } Label { text: "Selected month: " + Qt.formatDate(datePicker1.date, "MMMM-yyyy") } DatePicker { id: datePicker1 mode: "Years|Months" } Label { text: "Selected time: " + Qt.formatTime(datePicker2.date, "hh:mm:ss") } DatePicker { id: datePicker2 mode: "Hours|Minutes|Seconds" } Label { text: "Selected date: " + Qt.formatDate(datePicker3.date, "dddd, dd-MMMM-yyyy") } DatePicker { id: datePicker3 minimum: { var d = new Date(); d.setFullYear(d.getFullYear() - 1); return d; } maximum: Date.prototype.getInvalidDate.call() } } } }}
项目的代码在: https://github.com/liu-xiao-guo/datepicker
0 0
- 使用Ubuntu DatePicker来选择时间
- 联合使用DatePicker和TimePicker来选择日期和时间
- 联合使用DatePIcker和TimePicker来选择日期和时间
- android—DatePicker 和TimePicker显示日期以及使用TimePickerDialog,DatePickerDialog来专门实现时间选择对话框
- Android-使用TimerPicker和DatePicker选择时间和日期
- 时间选择器,选择日期DatePicker
- 日期选择代码,使用datepicker
- android 时间(TimePicker)日期(DatePicker)选择
- jquery UI datepicker 增加 时间的选择。
- <DatePicker><TimePicker>选择时间和日期
- 时间选择插件 datePicker 精确到分
- 时间控件的使用datePicker,
- 使用datepicker插件实现分段时间的选择8-6
- yii2 DatePicker时间选择器的使用(例:选择到年)
- 日期滚动选择(使用DatePicker实现)
- android时间控件DatePicker使用实例
- DatePicker TimePicker---时间日期控件的使用
- android------(设置时间)DatePicker对象的使用
- 简单题目的dfs模版
- HMM-前向后向算法
- Problem J: Home on the Range 家的范围
- 代码注释,神兽护体,代码无bug
- Gradle使用手记:安装
- 使用Ubuntu DatePicker来选择时间
- iOS CoreData详解(六)深入理解数据模型
- cocos2dx[3.2] ——数学类Vec2/Size/Rect
- STM32F107开发板ping电脑程序
- 图的邻接表
- 【Android wear 真机开发环境搭建】
- 如何增加Ubuntu的用户体验
- Openwrt 软件安装源
- 踩的一个小坑——JavaScript刷新页面