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. Select file
Qt 6.11 is out! See what's new in the release blog

Select file

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 1.4k 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.
  • M Offline
    M Offline
    moravas
    wrote on last edited by
    #1

    Hi Folks,

    I would like to provide a dialog window for the user to select files (once at a time) form my application, like "Open" or "New" menu in case of desktop applciations.
    How should I do that?

    Regards,
    Norbert

    R 1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      It's all in the documentation: http://doc.qt.io/qt-5/qfiledialog.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        moravas
        wrote on last edited by
        #3

        Hi,

        thanks a lot. I tried it out and as I saw, there is a bit problem about the scaling: the user cannot see the bottom side of the window, because its too large. Is it possible to scale the dialog box?

        Regards,
        Norbert

        R 1 Reply Last reply
        0
        • M moravas

          Hi Folks,

          I would like to provide a dialog window for the user to select files (once at a time) form my application, like "Open" or "New" menu in case of desktop applciations.
          How should I do that?

          Regards,
          Norbert

          R Offline
          R Offline
          Renn
          wrote on last edited by Renn
          #4

          @moravas If you want to open the file is only one file, use this function QFileDialog ::getOpenFileName();
          If you want to open more than one file using this function QFileDialog ::getOpenFileNames();

          1 Reply Last reply
          0
          • M moravas

            Hi,

            thanks a lot. I tried it out and as I saw, there is a bit problem about the scaling: the user cannot see the bottom side of the window, because its too large. Is it possible to scale the dialog box?

            Regards,
            Norbert

            R Offline
            R Offline
            raf924
            wrote on last edited by
            #5

            @moravas QFileDialog is just a subclass of QDialog which is a subclass of QWdiget , you can instanciate it and use its methods to change its properties (its size for example) like any other QWidget.

            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