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. Format external drive in qt

Format external drive in qt

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 4.2k 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
    rishygupta
    wrote on last edited by
    #1

    Can i use SHFormatDrive(HWND hwnd,UINT drive,UINT fmtID,UINT options) function in qt if yes then what to pass in HWND as a parent if dialog then how an i pass the value?

    if there is another method in qt that format drive from NTFS to FAT32 etc then please let me know...
    thanks...

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

      May be you should take a look "here":http://qt-project.org/forums/viewthread/6762

      AFAIK, File system issues are OS related.


      Declaration of (Platform) independence.

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        Looks like some ugly WinApi call. Take a look at "link":http://qt-project.org/doc/qt-4.8/qwidget.html#effectiveWinId this method is going away in Qt5, though, as far as I remember.

        (Z(:^

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

          Actually i need to execute the code in windows and mac platform..

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

            any other procedure to do this please le me know..

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

              There is no platform independent API in Qt to format drives, as far as I am aware of.

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

                what about system(echo | format c: /etc /etc..) is it good? or make any problem?

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

                  There are many problems with that:

                  • it is not OS independent
                  • it might fail and you'd never know it
                  • there is no way to monitor progress
                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    rishygupta
                    wrote on last edited by
                    #9

                    GetDriveType(device_name) is not working in windows xp 32-bit it gives 1-DRIVE_NO_ROOT_DIR for each drive and works fine in wndows 7 ?

                    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