Results 1 to 2 of 2

Thread: Display a file from Directory tree to show in QTextEdit

  1. #1
    Join Date
    Nov 2007
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Display a file from Directory tree to show in QTextEdit

    Hello, everyone!

    I have a program, it is a txt file reader. The splitter split the GUI with left side directory tree and right side textedit area.

    I want to use a directory tree to display the folders and files in the local system. when I double click one of a txt file (an iterm in the directory tree), the QtextEdit will display its content.

    However, I don't know how to do it ? firstly, which view should I use, QTreeView or QTreeWidget? secondly, how should I emit the signal ?

    Thanks and sorry for my poor English.

  2. #2
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Display a file from Directory tree to show in QTextEdit

    Have a look at this example provided by Trolltech:http://doc.trolltech.com/4.3/itemviews-dirview.html

Similar Threads

  1. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

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.