Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFileDialog sheets
Qt 6.11 is out! See what's new in the release blog

QFileDialog sheets

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.1k Views 1 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
    ecir.hana
    wrote on last edited by
    #1

    I would like to display QFileDialog::getSaveFileName() as a sheet on MacOS. I tried to set dialog parent to the window but it still shows up as normal floating dialog. I' using Qt 5.

    Please, how to make it display like a sheet? If it is not possible, how to create a save dialog as a sheet?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      b1gsnak3
      wrote on last edited by
      #2

      I don't know if you can modify the window flags of a dialog as it has it's own flag. However, you can create a subclass of QWidget and create your own dialog. You basically need two listviews (one for the system directories, another one for the contents of the Directory selected), a lineEdit in which the user selects the name and a combo box in which he can select the file type. Along with 2 buttons. Depending on your desired file type you use the specific methods to create a file (E.G. for a text file you use TextStream) and you save the file where the user needs it to be saved. Just don't forget to set the widget window flags accordingly.

      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