1、spliteview

2、stackview


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"}
}
}
}


3、messagedialog
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)视图的更多相关文章

  1. QTQuick控件基础(1)

    一.Item QtQuick所有的可视项目都继承自Item,它定义了可视化项目所有通用特性(x\y\width\height\anchors等)具体包括 1.作为容器 2.不透明性 没有设置opaci ...

  2. QTQuick控件基础(2)

    import QtQuick 2.2import QtQuick.Controls 1.2import QtQuick.Window 2.1ApplicationWindow {    visible ...

  3. 重新想象 Windows 8 Store Apps (17) - 控件基础: Measure, Arrange, GeneralTransform, VisualTree

    原文:重新想象 Windows 8 Store Apps (17) - 控件基础: Measure, Arrange, GeneralTransform, VisualTree [源码下载] 重新想象 ...

  4. 重新想象 Windows 8 Store Apps (16) - 控件基础: 依赖属性, 附加属性, 控件的继承关系, 路由事件和命中测试

    原文:重新想象 Windows 8 Store Apps (16) - 控件基础: 依赖属性, 附加属性, 控件的继承关系, 路由事件和命中测试 [源码下载] 重新想象 Windows 8 Store ...

  5. Win10系列:C#应用控件基础20

    SemanticZoom控件 SemanticZoom控件由相互关联的缩小视图和放大视图所组成,缩小视图用来显示内容的索引,放大视图可以用来显示内容的详细信息,用户可以根据阅读需要在两种视图之间自由切 ...

  6. VS2010/MFC编程入门之二十八(常用控件:列表视图控件List Control 上)

    前面一节中,鸡啄米讲了图片控件Picture Control,本节为大家详解列表视图控件List Control的使用.      列表视图控件简介 列表视图控件List Control同样比较常见, ...

  7. MFC常用控件之列表视图控件(List Control)

    近期学习了鸡啄米大神的博客,对其中的一些知识点做了一些自己的总结.不过,博客内容大部分来自鸡啄米.因此,这个博客算是转载博客,只是加了一些我自己的理解而已.若想学习鸡啄米大神的博客总结,请点击连接:h ...

  8. Delphi XE2 之 FireMonkey 入门(44) - 控件基础: TTreeView、TTreeViewItem

    Delphi XE2 之 FireMonkey 入门(44) - 控件基础: TTreeView.TTreeViewItem TScrollBox -> TCustomTreeView -> ...

  9. Delphi XE2 之 FireMonkey 入门(43) - 控件基础: TStringGrid、TGrid

    Delphi XE2 之 FireMonkey 入门(43) - 控件基础: TStringGrid.TGrid TStringGrid.TGrid 都是从 TCustomGrid 继承; 区别有:1 ...

随机推荐

  1. Scala学习笔记(3)-表达式归纳

    语法:使用表达式定义值和变量 val <identifier>[:<type>]=<expression>  字面值类型 var <identifier> ...

  2. Dividing the Path POJ - 2373 dp

    题意:你有无数个长度可变的区间d  满足 2a<=d<=2b且为偶数. 现在要你用这些区间填满一条长为L(L<1e6且保证是偶数)的长线段. 满足以下要求: 1.可变区间之间不能有 ...

  3. 审核被拒绝。附近??Guideline 5.1.2

    5. 1.2 Legal: Privacy - Data Use and Sharing Guideline 5.1.2 - Legal - Privacy - Data Use and Sharin ...

  4. Python yield 使用浅析(转)

    add by zhj: 说到yield,就要说说迭代器.生成器.生成器函数. 迭代器:其实就是一个可迭代对象,书上说迭代器,我个人不喜欢这个说法,有点晦涩.可迭代对象基本上可以认为是有__iter__ ...

  5. Library Publication 时遇到 "more than one library with package name" 错误的解决方法

    Library Publication 是 Gradle 在0.9.0 时增加的一个新特性,它的作用是让Lib也能发布不同的版本 在这之前,Lib只能发布release版本,你的项目中依赖的所有Lib ...

  6. nodejs(二)child_process模块

    1.child_process是Node.js的一个十分重要的模块,通过它可以实现创建多进程,以利用多核计算资源. child_process模块提供了四个创建子进程的函数,分别是spawn,exec ...

  7. Django +uwsgi+python3+nginx + mysql 部署

    环境: 服务器ip:192.168.0.110 centos服务器 6.4 + mysql 5.6 + django1.11 +nginx 1.13.7 + uwsgi 2.0.18 uwsgi介绍 ...

  8. android Thread

    1.Thread的三种形式 第一种: class MyThread extends Thread{ @Override public void run(){ Log.d("MainActiv ...

  9. 更改wordpress的默认登录页面名称wp-login

    好多人问我怎么修改wordpress的默认登录地址,因为只要知道是WORDPRESS的后台,都知道http://域名目录/wp-login.php就是登录地址,再用暴力破解器,很有可能会被破解开密码. ...

  10. linux 使用文件作为交换分区

    sudo fallocate -l 4G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile ...