Results 1 to 8 of 8

Thread: Sample program in Qt which deals in accessing the hard disks?

  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    10
    Thanked 13 Times in 12 Posts

    Default Sample program in Qt which deals in accessing the hard disks?

    Sample program in Qt which deals in accessing the hard disks?

  2. #2
    Join Date
    Oct 2010
    Location
    Berlin, Germany
    Posts
    358
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    18
    Thanked 68 Times in 66 Posts

    Default Re: Sample program in Qt which deals in accessing the hard disks?

    what do you want? open files? save files? open your computer and remove a harddisk physically?

  3. #3
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    10
    Thanked 13 Times in 12 Posts

    Default Re: Sample program in Qt which deals in accessing the hard disks?

    Just to get return values from the hard disk like model number, firmware version and all...

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 94 Times in 86 Posts

    Default Re: Sample program in Qt which deals in accessing the hard disks?

    Qt doesn't provide a class for such information. On Linux, at least, you need root privileges to obtain such listings; there are C system calls that can provide it, but I'd probably just parse the output of hdparm for the device I was interested in. I have no idea how such things work under Windows.

  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: Sample program in Qt which deals in accessing the hard disks?

    DeviceIoControl or WMI services will probably work on Windows, but its beyond the scope of this forum to explain how to use them. Also, on later versions of Windows, these calls may require higher priviledges than which a normal application will have, so you will need to request additional priviledges (perhaps even handling things like UAC on Windows Vista and above)

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Sample program in Qt which deals in accessing the hard disks?

    It's possible one can obtain such information via dbus on Linux (maybe in org.freedesktop.UDisks on the system bus).

    Edit: yes, it works

    BTW. The same info should be available via /sys interface.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    10
    Thanked 13 Times in 12 Posts

    Default Re: Sample program in Qt which deals in accessing the hard disks?

    A complete Qt program which accesses the hardware and returns some values. It should contain the whole project with the dll's. or if it is being statically linked. How it has bee linked should also be given??

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Sample program in Qt which deals in accessing the hard disks?

    Quote Originally Posted by Gokulnathvc View Post
    A complete Qt program which accesses the hardware and returns some values. It should contain the whole project with the dll's. or if it is being statically linked. How it has bee linked should also be given??
    How much are you offering for the program?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QFtp sample program
    By comlink21 in forum Qt Programming
    Replies: 7
    Last Post: 27th April 2012, 09:59
  2. QFileSystemModel and mounted disks
    By zuck in forum Qt Programming
    Replies: 0
    Last Post: 15th December 2009, 09:43
  3. Accessing program's own stdout/stderr
    By TemporalBeing in forum Qt Programming
    Replies: 8
    Last Post: 1st September 2009, 03:45
  4. detecting disks
    By nishad_kumar in forum Qt Programming
    Replies: 3
    Last Post: 7th September 2007, 08:35

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.