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. [Solved] QFileDialog doesn't give file name , than the Entire path ?
Forum Update on Monday, May 27th 2025

[Solved] QFileDialog doesn't give file name , than the Entire path ?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 5.6k 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.
  • R Offline
    R Offline
    Rahul Das
    wrote on last edited by
    #1

    This may be easy though, i couldn't find a way to get the file name alone than the full name using QFileDialog.


    Declaration of (Platform) independence.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rahul Das
      wrote on last edited by
      #2

      QFileInfo solved the problem :)


      Declaration of (Platform) independence.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        QFileDialog returns an entire path. You can use [[Doc:QFileInfo]] on that path to get any part of the file name you may require.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rahul Das
          wrote on last edited by
          #4

          Yes, thank you.

          [quote author="Andre" date="1311580894"]QFileDialog returns an entire path. You can use [[Doc:QFileInfo]] on that path to get any part of the file name you may require. [/quote]


          Declaration of (Platform) independence.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kamalakshantv
            wrote on last edited by
            #5

            Make use of QFileInfo.

            Edit: Ignore this post as I didn't refresh the page to see the above posts.

            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