Results 1 to 2 of 2

Thread: Viewing a file

  1. #1
    Join Date
    Jan 2011
    Posts
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Viewing a file

    I am saving a file to a folder and i want to view the file through program without going to that directory and opening that file.How can i do that?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Viewing a file

    You use QFile to open and read the file.
    Then something like a QTextEdit to view the file (if it is a readable text file).
    Other viewers are available to view graphics files.

    http://doc.qt.nokia.com/4.7/qfile.html#details
    http://doc.qt.nokia.com/4.7/qtextedit.html#details

Similar Threads

  1. How to restrict directory viewing to a subtree?
    By xfurrier in forum Qt Programming
    Replies: 2
    Last Post: 10th April 2009, 16:29
  2. Trouble while viewing a created a toolbar!!
    By aditya.kaole in forum Qt Programming
    Replies: 1
    Last Post: 6th April 2009, 21:04
  3. viewing files or some folders
    By as001622 in forum Qt Programming
    Replies: 4
    Last Post: 2nd June 2008, 12:12
  4. viewing removed but not submitted rows
    By maxel in forum Qt Programming
    Replies: 6
    Last Post: 6th October 2006, 17:20
  5. viewing jpeg-pictures on widgets
    By Yorma in forum Newbie
    Replies: 2
    Last Post: 19th January 2006, 16:32

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.