Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. FileDialog in QML 6.5
Forum Updated to NodeBB v4.3 + New Features

FileDialog in QML 6.5

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 617 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DharmarajG
    wrote on last edited by
    #1

    I want to use the FileDialog in Linux and use the native FileDialog not with FileDialog. Because i want to side pane. I don't want to use the QTLabs File Dialog. I am trying to use theFileDailog with QtQuick in QML

    import QtQuick
    import QtQuick.Window

    import QtCore

    import QtQuick.Layouts

    import QtQuick.Controls

    import QtQuick.Dialogs

    //import Qt.labs.platform
    Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    id: rectforcald
    
    Button {
        text: qsTr("Choose Image...")
        fileDialog1.DontUseNativeDialog: false
        onClicked: fileDialog1.open()
    }
    
    Image {
        id: image
        anchors.fill: parent
        fillMode: Image.PreserveAspectFit
    }
    
    
    
    FileDialog {
        currentFolder: StandardPaths.standardLocations(
                           StandardPaths.PicturesLocation)[0]
        //dontUseNativeDialog: true
        id: fileDialog1
        //sidebarVisible: false
        fileMode: FileDialog.SaveFile
        defaultSuffix: ".tsv"
        onAccepted: {
            console.log("Test")
            console.log(selectedFile)
        }
    }
    

    }

    I am not sure how to set the FileDialog.DontUseNativeDialog property because i need to the left side panel browser folder in linux which is not avaiable with the QT fileDialog.

    Can someone suggest the way to resolve this.

    1 Reply Last reply
    0
    • DiackneD Offline
      DiackneD Offline
      Diackne
      wrote on last edited by Diackne
      #2

      Hi

      try this:

      options : FileDialog.DontUseNativeDialog
      

      https://doc.qt.io/qt-6/qml-qtquick-dialogs-filedialog.html#options-prop

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved