ListItemFlatButton QML Type

Provides a flat button for list items, lists, and notifications, in Neptune 3 UI. More...

Since: Qt 5.11
Inherits:

ListItemBasic

Properties

Signals

Detailed Description

The ListItemFlatButton provides a type of list item with both, a FlatButton and a CloseButton on the right side. The FlatButton supports text on one line; its width is aligned with the text width. The CloseButton's visibility can be specified with the closeButtonVisible property.

The code snippet below shows how to use ListItemFlatButton:

import QtQuick 2.10
import shared.controls 1.0

Item {
    id: root
    ListView {
        model: 3
        delegate:  ListItemFlatButton {
            implicitWidth: Sizes.dp(765)
            implicitHeight: Sizes.dp(104)
            icon.name: "ic-update"
            symbolFlatButton: Style.image("ic-favorite")
            subText: "subtitle"
            text: "ListItem with button text"
            textFlatButton: "Text"
            closeButtonVisible: true
        }
    }
}

For a list of components available in Neptune 3 UI, see Neptune 3 UI Components and Interfaces.

Property Documentation

closeButtonVisible : bool

This property specifies whether a CloseButton is visible or not. The default value is false.


symbolFlatButton : string

This property holds the path to a FlatButton's icon.


textFlatButton : string

This property holds the text to display on a FlatButton.


Signal Documentation

closeButtonClicked()

This signal is emitted when the CloseButton is clicked.

Note: The corresponding handler is onCloseButtonClicked.


flatButtonClicked()

This signal is emitted when the FlatButton is clicked.

Note: The corresponding handler is onFlatButtonClicked.


© 2019 Luxoft Sweden AB. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.