Results 1 to 12 of 12

Thread: open large file in qt?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: open large file in qt?

    What does Get Info in Finder has to say about /dev?
    I mean, do you have any permissions at all?

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: open large file in qt?

    Quote Originally Posted by marcel View Post
    What does Get Info in Finder has to say about /dev?
    I mean, do you have any permissions at all?
    Normal ist /Volumes

    Qt Code:
    1. #if defined Q_WS_MAC
    2. /* apple + K */
    3. label_webdav->setText(tr("Mac OS: Mount Disk Webdav Root"));
    4. QString listdiron ="/Volumes/";
    5. webdav_root->addItem(disksetting);
    6. /* webdav_root->addItem(listdiron);*/
    7. QDir dir(listdiron);
    8. if (dir.exists()) {
    9. const QFileInfoList list = dir.entryInfoList();
    10. for (int i = 0; i < list.size(); i++)
    11. {
    12. fi = list.at(i);
    13. if (fi.isDir() && fi.fileName() != "." && fi.fileName() != "..") {
    14. QString disker = fi.absoluteFilePath();
    15. QString diskeree = disker.append("/");
    16. webdav_root->addItem(diskeree);
    17. }
    18. }
    19. }
    20. webdav_root->setEditable(false);
    21. #endif
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question Re: open large file in qt?

    Thanks for Reply.

    But Actually I want to open the HardDisk not to read Dir or File Actually I have to Read the Bytes from the HardDisk.
    I have a function to do that but Actually It can not able to open the file. I have also used c function open("/dev/rdisk0",O_RDONLY) but it also not able to open the Drives.

    It is showing that it has read write permission when I see from Getinfo in finder.
    Actually I have tried on other system but it doesnot work.

    It is working when I open a removable media but not in case of Hard disk.

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

    Default Re: open large file in qt?

    What does ls -l /dev/rdisk0 return?

  5. #5
    Join Date
    Dec 2006
    Posts
    211
    Thanks
    27
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question Re: open large file in qt?

    Hey guys I got it.
    Actually I am login as admin but it have some file system permission to root user.

    So I just enabled user root and now it is running correctly.

    Guys Thanks for reply.

Similar Threads

  1. QDesktopServices open url & local file & pdf or doc
    By patrik08 in forum Qt Programming
    Replies: 9
    Last Post: 14th April 2012, 04:42
  2. Restrict user to open the same file
    By vermarajeev in forum General Programming
    Replies: 33
    Last Post: 25th May 2007, 08:15
  3. How to open a Pdf file from Qt
    By vishal.chauhan in forum Newbie
    Replies: 2
    Last Post: 28th March 2007, 08:24
  4. Qt 4.1.4 on VS2005 error- cannot open input file 'qtmain.lib'
    By Ashish in forum Installation and Deployment
    Replies: 10
    Last Post: 11th October 2006, 16:05
  5. QProcess open all file -> url.dll,FileProtocolHandler
    By patrik08 in forum Qt Programming
    Replies: 2
    Last Post: 26th June 2006, 17:07

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.