Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, August 2007
Displaying HTML link in TreeView


Message 1 in thread

I am displaying some data in a QTreeView.  The model and view are
working but some of the data values are actually HTML markup and
links.  Is there any way to make the tree view display the HTML
information similar to how QTextBrowser does?  (namely, formatting the
text according to the markup and making it possible to click on the
links)

-Allen

--
 [ signature omitted ] 

Message 2 in thread

What about using setItemDelegate with a QTextBrowser as argument?

- Thomas

2007/8/12, Allen Bierbaum <abierbaum@xxxxxxxxx>:
> I am displaying some data in a QTreeView.  The model and view are
> working but some of the data values are actually HTML markup and
> links.  Is there any way to make the tree view display the HTML
> information similar to how QTextBrowser does?  (namely, formatting the
> text according to the markup and making it possible to click on the
> links)
>
> -Allen
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>

--
 [ signature omitted ] 

Message 3 in thread

Doesn't setItemDelegate require an object that has a type derived from
QAbstractItemDelegate?

I have used delegates to create custom editors and even overridden the
default paint callback to make the delegate render differently when
just viewing the data, but I have never seen a way to replace the
default data viewing with a new widget.  If you can point me at some
way to do this I would greatly appreciate it because I have wanted to
do something like this many times.  For example replacing the default
view with an image for some entries in the tree.

Do you have an example of how to do this?

-Allen


On 8/12/07, Thomas Dähling <t.daehling@xxxxxxxxxxxxxx> wrote:
> What about using setItemDelegate with a QTextBrowser as argument?
>
> - Thomas
>
> 2007/8/12, Allen Bierbaum <abierbaum@xxxxxxxxx>:
> > I am displaying some data in a QTreeView.  The model and view are
> > working but some of the data values are actually HTML markup and
> > links.  Is there any way to make the tree view display the HTML
> > information similar to how QTextBrowser does?  (namely, formatting the
> > text according to the markup and making it possible to click on the
> > links)
> >
> > -Allen
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
> >
> >
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>

--
 [ signature omitted ]