Qt-interest Archive, November 2007
Having an image as "base" in a QTreeView?
Message 1 in thread
In Qt 4.1.x, is it possible to have an image be in
the "base" of a QTreeView? In other words, instead
of the part of the QTreeView widget that the entries are
drawn on being white behind the entries, I'd like
to have the entries be superimposed over a single
image. If it is possible, can you give me an idea
of what the procedure is to do it?
If this is not possible or very hard in 4.1.x, I'd
like to know for future reference if it gets any
easier in 4.3/4.4.
Thanks!
--
[ signature omitted ]
Message 2 in thread
On 11/1/07, Richard Carreiro <RCarreiro@xxxxxxxx> wrote:
> In Qt 4.1.x, is it possible to have an image be in
> the "base" of a QTreeView? In other words, instead
> of the part of the QTreeView widget that the entries are
> drawn on being white behind the entries, I'd like
> to have the entries be superimposed over a single
> image. If it is possible, can you give me an idea
> of what the procedure is to do it?
>
> If this is not possible or very hard in 4.1.x, I'd
> like to know for future reference if it gets any
> easier in 4.3/4.4.
Stylesheets ("QTreeView { background-image: path-to-image; }") should
do the trick in 4.2 or later.
--
[ signature omitted ]
Message 3 in thread
> On 11/1/07, Richard Carreiro <RCarreiro@xxxxxxxx> wrote:
> > In Qt 4.1.x, is it possible to have an image be in
> > the "base" of a QTreeView? In other words, instead
> > of the part of the QTreeView widget that the entries are
> > drawn on being white behind the entries, I'd like
> > to have the entries be superimposed over a single
> > image. If it is possible, can you give me an idea
> > of what the procedure is to do it?
[snip]
> Stylesheets ("QTreeView { background-image: path-to-image; }") should
> do the trick in 4.2 or later.
Thanks!
That's good to know for when we upgrade the version of Qt
we're using, but since we're stuck using 4.1.x for now,
is there any way to do this in 4.1.x or am I out
of luck?
== Rich
--
[ signature omitted ]