Liri Fluid API

SnackBar QML Type

SnackBar provides a brief feedback about an operation. More...

Import Statement: import Fluid.Controls 1.1




  • void close()
  • void open(text, string buttonText)

Detailed Description

  Page {
      title: qsTr("Send a message")

      Button {
          anchors.centerIn: parent
          text: qsTr("Send Message")
          onClicked:"Message sent"))

      SnackBar {
          id: snackBar

SnackBar provides a brief feedback about an operation through a message at the bottom of the screen.

It contains a single line of text directly related to the operation performed. There can be a text action, but no icons.

For more information you can read the Material Design guidelines.

Property Documentation

duration : int

Amount of time (in ms) to keep the notification visible. The default is 2s.

fullWidth : bool

Whether the bar should take full screen width. The default depends on the device: full width only on phones and tablets.

[read-only] opened : bool

Whether the snack bar is currently open or not.

Signal Documentation


This signal is emitted when the button is clicked. The handler is onClicked.

Method Documentation

void close()

Close the bar.

void open(text, string buttonText)

Open the bar with the specified text and buttonText.