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. How can i open dir?
Forum Updated to NodeBB v4.3 + New Features

How can i open dir?

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

    I have object of class QDir, how i can open this directory?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      The best reference is "this":http://doc.qt.nokia.com/4.7/qdir.html

      What do you mean with opening?

      If you are looking for setting the "working path":http://doc.qt.nokia.com/4.7/qdir.html#setCurrent this might be the solution.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Ruzik
        wrote on last edited by
        #3

        I want that dir will be open in system filemanadger

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

          Perhaps QDesktopServices::openUrl can be of help to you.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Ruzik
            wrote on last edited by
            #5

            I already tried, but it is doesnt worke
            I try
            @ QUrl url;
            url.setPath(QFileInfo(addressOfCurrenFile).dir().absolutePath());
            QDesktopServices::openUrl(url);//program hangs@
            @ QUrl url(QFileInfo(addressOfCurrenFile).dir().absolutePath());
            QDesktopServices::openUrl(url);@

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

              Did you try using QUrl::fromLocalFile?

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Ruzik
                wrote on last edited by
                #7

                I try, but it is worke noly with files, no dir

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

                  Then, I am sorry, I think you have to resport to platform dependent code. On windows, you can start explorer.

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    Ruzik
                    wrote on last edited by
                    #9

                    pity, thank you for your try to help

                    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