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. How to make FileDialog(Qt Quick) can be dropped and dragged on MacOS
Qt 6.11 is out! See what's new in the release blog

How to make FileDialog(Qt Quick) can be dropped and dragged on MacOS

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 303 Views 2 Watching
  • 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.
  • E Offline
    E Offline
    EniacCheng
    wrote on last edited by
    #1

    My code below

    import QtQuick
    import QtQuick.Dialogs
    
    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        MouseArea {
            anchors.fill: parent
            onClicked: {
                fileDialog.open()
            }
        }
    
        FileDialog {
            id : fileDialog
            modality: Qt.ApplicationModal
        }
    }
    
    

    On MacOS (M1) the FileDialog can't be dropped and dragged(On windows is OK). Is there a way to fix it? Thanks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      If memory serves well, you should have a file dialog that is shown as a drawer which is an integral part of the application window. That's usual on macOS for modal dialogs.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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