QTQuick控件基础(3)视图
1、spliteview


ApplicationWindow {
visible: true
width: 640
height: 480
MouseArea{
anchors.fill: parent
acceptedButtons: Qt.LeftButton|Qt.RightButton|Qt.MiddleButton
onClicked: {
if(mouse.button === Qt.LeftButton ){
stackView.push([blueView,greenView,yellowView]);
}else if(mouse.button === Qt.RightButton){
stackView.pop();
}else{
stackView.push({item:orangeView,replace:ture})
}
}
}
Rectangle {id:blueView;color: "blue"}
Rectangle {id:greenView;color: "green"}
Rectangle {id:yellowView;color: "yellow"}
Rectangle {id:orangeView;color: "orange"}
StackView{
id:stackView
anchors.fill: parent
initialItem: Item{
id:redView
Rectangle{anchors.fill: parent;color: "red"}
}
}
}
ApplicationWindow {
visible: true
width: 640
height: 480
Button{
id:window
width: 300
height: 300
anchors.centerIn: parent
onClicked: messageDialog.open()
}
MessageDialog{
id:messageDialog
title:"注意注意"
text: "欢迎使用QTQuick"
detailedText: "这里是具体文字"
icon:StandardIcon.Question
standardButtons: StandardButton.Yes|StandardButton.Help|StandardButton.Open
onYes: {}
onHelp: {}
onAccepted: {}
}
}

QTQuick控件基础(3)视图的更多相关文章
- QTQuick控件基础(1)
一.Item QtQuick所有的可视项目都继承自Item,它定义了可视化项目所有通用特性(x\y\width\height\anchors等)具体包括 1.作为容器 2.不透明性 没有设置opaci ...
- QTQuick控件基础(2)
import QtQuick 2.2import QtQuick.Controls 1.2import QtQuick.Window 2.1ApplicationWindow { visible ...
- 重新想象 Windows 8 Store Apps (17) - 控件基础: Measure, Arrange, GeneralTransform, VisualTree
原文:重新想象 Windows 8 Store Apps (17) - 控件基础: Measure, Arrange, GeneralTransform, VisualTree [源码下载] 重新想象 ...
- 重新想象 Windows 8 Store Apps (16) - 控件基础: 依赖属性, 附加属性, 控件的继承关系, 路由事件和命中测试
原文:重新想象 Windows 8 Store Apps (16) - 控件基础: 依赖属性, 附加属性, 控件的继承关系, 路由事件和命中测试 [源码下载] 重新想象 Windows 8 Store ...
- Win10系列:C#应用控件基础20
SemanticZoom控件 SemanticZoom控件由相互关联的缩小视图和放大视图所组成,缩小视图用来显示内容的索引,放大视图可以用来显示内容的详细信息,用户可以根据阅读需要在两种视图之间自由切 ...
- VS2010/MFC编程入门之二十八(常用控件:列表视图控件List Control 上)
前面一节中,鸡啄米讲了图片控件Picture Control,本节为大家详解列表视图控件List Control的使用. 列表视图控件简介 列表视图控件List Control同样比较常见, ...
- MFC常用控件之列表视图控件(List Control)
近期学习了鸡啄米大神的博客,对其中的一些知识点做了一些自己的总结.不过,博客内容大部分来自鸡啄米.因此,这个博客算是转载博客,只是加了一些我自己的理解而已.若想学习鸡啄米大神的博客总结,请点击连接:h ...
- Delphi XE2 之 FireMonkey 入门(44) - 控件基础: TTreeView、TTreeViewItem
Delphi XE2 之 FireMonkey 入门(44) - 控件基础: TTreeView.TTreeViewItem TScrollBox -> TCustomTreeView -> ...
- Delphi XE2 之 FireMonkey 入门(43) - 控件基础: TStringGrid、TGrid
Delphi XE2 之 FireMonkey 入门(43) - 控件基础: TStringGrid.TGrid TStringGrid.TGrid 都是从 TCustomGrid 继承; 区别有:1 ...
随机推荐
- 老师的blog整理
python基础部分: 宝哥blog: https://www.cnblogs.com/guobaoyuan/ 开哥blog: https://home.cnblogs.com/u/Neeo 女神笔记 ...
- WordCount优化
Github 地址:chaosrings/wcPro 1.PSP2.1表格 psp 2.1 psp阶段 预估耗时(分钟) 实际耗时(分钟) Planning 计划 10 10 Estimate 估计这 ...
- MyEclipse如何安装egi插件及如何将github项目引入MyEclipse中
一.如何查看MyEclipse版本及Eclipse版本号 查看MyEclipse版本号:MyEclipse主界面的菜单栏的最左边“help”—>选择“About MyEclipse Enterp ...
- 【python-opencv】17-形态学操作-腐蚀与膨胀
形态学操作其实就是改变物体的形状,比如腐蚀就是"变瘦",膨胀就是"变胖",看下图就明白了: 形态学操作一般作用于二值化图(也可直接作用于原图),来连接相邻的元素 ...
- SpringMVC 问题 org.springframework.beans.factory.BeanDefinitionStoreException
HTTP Status 500 – Internal Server Error Type Exception Report Message Servlet.init() for servlet [sp ...
- 【剑指offer】旋转数组的最小数字
一.题目: 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转. 输入一个非减排序的数组的一个旋转,输出旋转数组的最小元素. 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个 ...
- Unity注意事项
1.尽量避免出现中文路径 2.做2D游戏时,图片最好要与背景图片保持一定距离 以免重叠
- rplidar跑cartographer
一.Cartographer编译 cartographer依赖的大型第三方库很少,编译时基本没有依赖项问题,基本按照官方文档的步骤来,略作修改.使用的环境是Ubuntu16.04+ROS Kineti ...
- KMP(http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2772)
#include <stdio.h>#include <string.h>#include <stdlib.h>char a[1000001],b[1000001] ...
- [LeetCode] 561. Array Partition I_Easy tag: Sort
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1 ...