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. Cdrom and qt
QtWS25 Last Chance

Cdrom and qt

Scheduled Pinned Locked Moved General and Desktop
10 Posts 4 Posters 4.7k 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.
  • K Offline
    K Offline
    kitten
    wrote on last edited by
    #1

    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
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kitten
        wrote on last edited by
        #3

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

        www.kitten.mihanblog.com

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

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

          1 Reply Last reply
          0
          • F Offline
            F Offline
            fluca1978
            wrote on last edited by
            #5

            Aren't removable media automatically mountde in OSX?

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

              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
              0
              • F Offline
                F Offline
                fluca1978
                wrote on last edited by
                #7

                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
                0
                • K Offline
                  K Offline
                  kitten
                  wrote on last edited by
                  #8

                  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
                  0
                  • F Offline
                    F Offline
                    fluca1978
                    wrote on last edited by
                    #9

                    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
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #10

                      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
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved