V-Play 文档翻译 ListPage
来源:互联网 发布:赵薇杀人知乎 编辑:程序博客网 时间:2024/05/18 16:17
V-Play 文档翻译 ListPage
翻译:qyvlik
应用的一个页面。
VPlayApps 1.0
Inherits: Page
属性
compactSections
:bool
delegate
:alias
emptyText
:alias
emptyView
:alias
listView
:alias
model
:var
pullToRefreshHandler
:alias
pullToRefreshHandler
. :PullToRefreshHandler
section
:alias
信号
itemSelected(int index, var item)
详细描述
The ListPage
component is a convenience item wrapping a single AppListView
component into a Page
object. It also contains a PullToRefreshHandler
, which can be activated by setting pullToRefreshHandler.pullToRefreshEnabled
. It is disabled by default in a ListPage
.
由一个 AppListView
内嵌到 Page
所组成,也包含一个 PullToRefreshHandler
。默认不可用。
A lot of app screens consist just of a single AppListView
, therefore this component can save some boilerplate code.
由于内含一个 AppListView
,可以减少一些重复代码。
The contained listView
comes pre-initialized with a delegate
of type SimpleRow
. If the section
features are used, the SimpleSection
type is used as the default section delegate.
使用 SimpleRow
作为 listView
的 delegate
,使用 SimpleSection
作为默认的 section
。
属性文档
compactSections
:bool
当时分段标题(section)时,允许切换内部的 SimpleSection
的样式。可以通过 SimpleSection::style.compactStyle
设置。
delegate
:alias
An alias to access and set the ListView::delegate
data.
内部的 ListView::delegate
的引用。
emptyText
:alias
An alias to access and set the AppListView::emptyText
data.
内部 AppListView::emptyText
的引用。
emptyView
:alias
An alias to access and set the AppListView::emptyView
data.
内部 AppListView::emptyView
的引用。
listView
:alias
An alias to access the component’s AppListView
child.
内部 AppListView::listView
的引用,用来访问 AppListView
的孩子。
model
:var
The model to be used for the ListView::model
data.
内部 AppListView::model
的引用。
pullToRefreshHandler
:alias
An alias to a PullToRefreshHandler
item inside the AppListView
.
内部 AppListView
的 PullToRefreshHandler
引用。
Activate it by setting pullToRefreshEnabled
to true and connecting the refresh
signal.
设置 PullToRefreshHandler::pullToRefreshEnabled
为真,然后连接 refresh
信号。
emptyText.text: qsTr("下拉更新") pullToRefreshHandler.pullToRefreshEnabled: listView.contentY <= 0 pullToRefreshHandler.onRefresh: { pullToRefreshHandler.refreshing = true; // async.... doALongLoading(function(){ pullToRefreshHandler.refreshing = false; }) }
section
:alias
An alias to access and set the ListView::section
configuration to display a ListView
with sections. The ListPage
uses the SimpleSection
type as the ListView::section.delegate
by default.
内部 ListView::section
的引用。
Note: Usually, only a model
based on the ListModel
type supports sections. ListPage
automatically uses the AppListView::prepareArraySections
function to allow sections also for arrays.
注意:通常情况下,model
只支持 ListModel
,来显示 section
。但是 ListPage
会自动使用 AppListView::prepareArraySections
来处理,然后显示 section
。
使用方法如下:
ListPage { model: [{ type: "Fruits", text: "Banana" }, { type: "Fruits", text: "Apple" }, { type: "Vegetables", text: "Potato" }] section.property: "type"}
信号文档
itemSelected(int index, var item)
This convenience handler gets called when a row within the contained listView was selected.
点击列表中某一项时触发。
Note: This is only called if the delegate is not overridden by a custom delegate
.
注意:这个信号,只有在没有重写 delegate
的情况下有效。(其实就是使用 SimpleRow
来实现的)
- V-Play 文档翻译 ListPage
- V-Play 文档翻译 App
- V-Play 文档翻译 Navigation
- V-Play 文档翻译 Page
- V-Play 文档翻译 PullToRefreshHandler
- Qt android v-play && 文档
- 安装 V-Play 笔记
- V-Play入门手册
- play framework(翻译)
- V-Play 使用粗体验
- play的开发文档
- (Spring文档翻译)Part V, the Web 17.1 Spring Web MVC framework介绍
- 翻译文档
- 文档翻译
- 【翻译】Play框架入门教程一:建立项目
- Play framework 框架入门学习文档(play-1.2.3)
- MongoDB文档翻译-引言-文档
- sphinx英文文档(v.1.11)
- C#开发ftp客户端遇到550错误
- 以socket连接方式向memcached存储数据
- Hdu 2795
- 出现乱码的原因及改正
- Hadoop2.2配置详解
- V-Play 文档翻译 ListPage
- 设计模式——单例模式
- 深入研究java.lang.ThreadLocal类
- 紫书 p120 第五章例题5-7 丑数
- 深入理解Android之AOP
- Leetcode: 232. Implement Queue using Stacks(JAVA)
- 机器学习中的相似性度量
- 不谈程序,谈发展,推荐一些励志书,也许可以改变你的困境
- traits编程技法感悟