[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Best widget for tailing log data?
From:       Robin Atwood <robin () binro ! org>
Date:       2009-12-30 12:55:39
Message-ID: 200912301955.39476.robin () binro ! org
[Download RAW message or body]

On Wednesday 30 December 2009, Adam Batkin wrote:
> > What do people think is the best widget for "tailing" logging output from
> > a process? I looked at the numerous QText* widgets and QTextEdit seems a
> > good bet. But what is best, using a QTextCursor to add lines to the end
> > of the text and remove lines from the top, or keeping the log lines in an
> > eternal stack (via QStringList) and updating the widget en masse? The
> > amount of output will not normally be very large.
> 
> A couple other options include using a QListView/Widget or
>  QTreeView/Widget.
> 
> If you go for a Tree, make sure that each element has 0 children, and
> that way it looks like a table. I find that the formatting and handling
> of "lists" of data is better with the Tree controls than with the Table
> controls.
> 
> I wrote a small log viewing app and parsed out some bits from the data
> (like timestamps) and displayed them in different columns (using
> QTreeView). Also I found the following useful:
> 
> setRootIsDecorated(false);
> setItemsExpandable(false);
> setUniformRowHeights(true);
> setAlternatingRowColors(true);
> setAllColumnsShowFocus(true);

Thanks, Adam, I had also come to a similar conclusion!

Cheers
-Robin
-- 
----------------------------------------------------------------------
Robin Atwood.

"Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst"
         from "Mandalay" by Rudyard Kipling
----------------------------------------------------------------------








 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic