Results 1 to 8 of 8

Thread: How To Extract A File

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: How To Extract A File

    $ ldd `which file`
    linux-gate.so.1 => (0xbfffe000)
    libmagic.so.1 => /usr/lib/libmagic.so.1 (0xb7f13000)
    libz.so.1 => /lib/libz.so.1 (0xb7f00000)
    libc.so.6 => /lib/i686/libc.so.6 (0xb7dd3000)
    /lib/ld-linux.so.2 (0xb7f3d000)
    I think this says it all

  2. #2
    Join Date
    May 2006
    Posts
    68
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    10

    Default Re: How To Extract A File

    I need to use the code in windows based QT ( C ++)
    I am not sure how to use your code in that.Is it forlinux .
    Where will I write in the code, Presently I open the file with following code

    Qt Code:
    1. void steg::showdatafile()/*** THIS MODULE SHOWS THE DATA FILE *****/
    2. {
    3. if(QFile::exists(ui.datalineEdit->text()))
    4. {
    5. s << "url.dll,FileProtocolHandler" << ui.datalineEdit->text() ;
    6. p.startDetached(QString("rundll32.exe") , s );
    7. }
    8. else
    9. QMessageBox::warning(this, tr("FILE ERROR"),
    10. tr("<p><b> ERROR IN DISPLAYING DATA FILE.</b>"
    11. "</p><p><b>CHOOSE THE DATA FILE AND MAKE SURE THE FILE EXISTS OR CHOOSE SEPARATE FILE</b>"));
    12.  
    13. }
    To copy to clipboard, switch view to plain text mode 

    that is ----I am using FileProtocolHandler.But it is going to treat my file as text file where as my requirement is as told above.

  3. #3
    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
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: How To Extract A File

    Well... Windows is the operating system I was talking about in one of my previous posts in this thread. If I were you, I'd check if libmagic compiles on your system. It's probably a GNU utility, so it will probably work.

    See here: http://gnuwin32.sourceforge.net/packages/file.htm

Similar Threads

  1. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 11:47
  2. SQLite-DB in a qrc file
    By Lykurg in forum Qt Programming
    Replies: 5
    Last Post: 31st July 2006, 19:24
  3. File permission QFile::WriteOther on Win Dos
    By patrik08 in forum Newbie
    Replies: 1
    Last Post: 13th June 2006, 14:16
  4. Accessing DTD in an XML file via QtXml module?
    By jorma in forum Qt Programming
    Replies: 1
    Last Post: 6th May 2006, 18:09
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

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.