Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Cdrom and qt

    General and Desktop
    4
    10
    4075
    Loading More Posts
    • 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.
    • K
      kitten last edited by

      hi to everyone
      i want to know how can i determine if any cd/dvd is in my Rom or not?and if some cd/dvd is in , what is its name?
      my platform is mac
      should i use QDir?how?
      thanks a lot

      www.kitten.mihanblog.com

      1 Reply Last reply Reply Quote 0
      • A
        andre last edited by

        You could try "QSystemStorageInfo":http://doc.qt.nokia.com/qtmobility/qsystemstorageinfo.html class from the Qt Mobility API.

        1 Reply Last reply Reply Quote 0
        • K
          kitten last edited by

          Can i use it on macintosh?i thought it is for mobile programming

          www.kitten.mihanblog.com

          1 Reply Last reply Reply Quote 0
          • A
            andre last edited by

            It should work on the desktop too, but I have not tried it on mac. I don't have one.

            1 Reply Last reply Reply Quote 0
            • F
              fluca1978 last edited by

              Aren't removable media automatically mountde in OSX?

              1 Reply Last reply Reply Quote 0
              • A
                andre last edited by

                Could still be useful to know the media though. For instance, you would not allow it as a location to save a file...

                1 Reply Last reply Reply Quote 0
                • F
                  fluca1978 last edited by

                  Uhm...sounds to me much work to prevent users from doing a stupid thing and that cannot be prevented at all....

                  1 Reply Last reply Reply Quote 0
                  • K
                    kitten last edited by

                    No i want to get a cd name of mounted disk to check if it is an especial disk.

                    www.kitten.mihanblog.com

                    1 Reply Last reply Reply Quote 0
                    • F
                      fluca1978 last edited by

                      On Linux you can use volname to get the name of a volume, maybe on mac there is something like glabel. Why not relying, if possible, on a much more portable approach like checking a file within the cd to see if it is the type you are searching for?

                      1 Reply Last reply Reply Quote 0
                      • G
                        goetz last edited by

                        On the Mac, mounted CD-ROMs are listed under /Volumes. To check whether your special disk is mounted, just iterate through the entries in /Volumes (using QDir::entryList() or QDir::entryInfoList()) and check if it is the one you search for.

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post