Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

Sailfish Pickers

API Documentation
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Detailed Description

ImagePickerPage QML Type

An image picker for selecting a single image file More...

Import Statement: import Sailfish.Pickers 1.0
  • List of all members, including inherited members

Properties

  • selectedContent : url
  • selectedContentProperties : var
  • title : string

Detailed Description

Here is an example usage:

 import QtQuick 2.2
 import Sailfish.Silica 1.0
 import Sailfish.Pickers 1.0

 ApplicationWindow {
     initialPage: Component {
         Page {
             id: page

             Column {
                 anchors.centerIn: parent
                 width: parent.width - Theme.horizontalPageMargin * 2
                 spacing: Theme.paddingMedium

                 Button {
                     text: "Image"
                     onClicked: pageStack.push(imagePickerPage)
                 }

                 Image {
                     id: selectedImage
                     sourceSize.height: Theme.itemSizeHuge
                 }
             }

             Component {
                 id: imagePickerPage
                 ImagePickerPage {
                     onSelectedContentPropertiesChanged: {
                         selectedImage.source = selectedContentProperties.filePath
                     }
                 }
             }
         }
     }
 }

Use MultiImagePickerDialog for picking multiple images.

See also ContentPickerPage, DocumentPickerPage, FilePickerPage, MusicPickerPage, and VideoPickerPage.

Property Documentation

[read-only] selectedContent : url

This property holds url of the selected content.

See also selectedContentProperties.


[read-only] selectedContentProperties : var

This property holds the selected content item.

The selectedContentProperties value contains following members.

  • fileName - file name without path
  • filePath - full file path including file name
  • url - filePath formatted as url
  • title - name of the file, this can be fetched from metadata of the file
  • mimeType - mime type of the file for example "image/jpeg", "image/png", "application/pdf", "video/mp4", "audio/mpeg"

title : string

This property holds the title of the page.

Defaults to translated "Select image".


  • Legal
  • Contact Us
  • Jollyboys Ltd © 2024

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn