Results 1 to 4 of 4

Thread: Log browser suggestions?

  1. #1
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question Log browser suggestions?

    Hey *wink*

    I've been dabbling in Qt for a while now, and written an appliaction or two, but I wouldn't by any means say that I know Qt.

    What I'm trying to do atm, is to write a Log viewer, that would have the functionality of showing a sequence number. This could work somewhat like a line number in for example kate, connected to a certain line, but not a line number per say. Another functionality that I would like is to be able to show/hide any given line in the log on the fly, so that I'm able to filter out unwanted/unneeded data quickly. Syntax highlighting is another thing that I want/need.

    Now to the question; I've been looking at different options on how to do this, including browsing this forum, but I've yet to come up with a "good" way to do this. I've looked especially at QTextBrowser, but I'm not really sure about where to start to be able to add the functionality I need to this. So, oh gurus, do you have any suggestions on how I could tackle this problem?

    Thanks,
    -NRGizeR

    Oh, and I'm using Qt 3.3.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Log browser suggestions?

    How about QListView?

  3. #3
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Log browser suggestions?

    Quote Originally Posted by jacek
    How about QListView?
    Isn't that like a tree structure? Or can it be used as a richtext text display widget as well? Some kind of table formatting wouldn't be that bad actually, but the most important part is really to be able to easily (in code) distinguish one line from another, and hide/show any given line quickly... Am I missing something about QListView?

    Thanks,
    -NRGizeR

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Log browser suggestions?

    Quote Originally Posted by NRGizeR
    Isn't that like a tree structure?
    It can display a tree, but it doesn't have to.

    Quote Originally Posted by NRGizeR
    Or can it be used as a richtext text display widget as well?
    You can subclass QListViewItem and make it display richtext using QSimpleRichText.

    Quote Originally Posted by NRGizeR
    the most important part is really to be able to easily (in code) distinguish one line from another, and hide/show any given line quickly...
    With QListView each line will be a different object, so you won't have problems with it.

    I'm not sure how large log file QListView can handle, but since you have to create a lot of QListViewItems, it might not be enough.

    The alternative is QTextEdit or QTextBrowser. QTextEdit even can operate in Log mode (in which it should be able to display more text than in other modes, but it also supports less formatting tags). Unfortunately it won't be easy to hide and show particular lines, but maybe you can have two representations --- one internal on which you can operate easily and one for the QTextEdit, that contains processed log visible to the user (of course it will increase memory usage).

    Third solution is to create your own widget and if you want only to display logs, it might not be that hard.

  5. The following user says thank you to jacek for this useful post:

    NRGizeR (14th July 2006)

Similar Threads

  1. Text Browser Link Question
    By taylor34 in forum Qt Programming
    Replies: 2
    Last Post: 20th June 2006, 19:54
  2. html browser!!
    By Seema Rao in forum Qt Programming
    Replies: 15
    Last Post: 12th May 2006, 09:24
  3. Opening swf file in the default browser
    By munna in forum Qt Programming
    Replies: 16
    Last Post: 5th May 2006, 09:33
  4. Need Basic html Browser
    By awalesminfo in forum Newbie
    Replies: 6
    Last Post: 21st March 2006, 17:14
  5. Skinnable GUI.. suggestions?
    By strandtc in forum Qt Programming
    Replies: 0
    Last Post: 1st March 2006, 05:57

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.