[Qt-interest] StyleSheet problem/question

Jaco Naude naude.jaco at gmail.com
Tue Nov 30 15:54:00 CET 2010


I've had the same problem before in a QListView and I could not get rid of
it using stylesheets only. That said it might be possible but I could not
figure it out. The way I got around it was to set the focus policy of the
view as follows:

my_view->setFocusPolicy(Qt::NoFocus);

Not sure if that is what you want but it worked for me.
Cheers
Jaco

On Tue, Nov 30, 2010 at 2:02 PM, Morten W. Jørgensen
<morten at bugless.co.uk>wrote:

> Hi All.
>
> I have a QTreeView that I am styling to meet my needs. One of my needs is
> to
> get rid of the dashed border that is drawn around the cell last clicked on.
> I
> simply cannot figure out how to get rid of that.
>
> The attached 'dashedborder.jpeg' illustrates what I would like to get rid
> of.
> The red row is the selected one and the cell containing "How to edit a form
> in
> Qt Designer" was the last clicked . It has the tiny dotted/Dashed border
> while
> the sell to the left (still the selected row) has not.
>
> I have attached a project reproducing my problem.
>
> My question is: How do I, by using Stylesheets only, get rid of the dashed
> border - the per cell feedback.
>
> If that is not possible using stylesheets only, what is the minimum
> approach
> to get rid of it. I would like NOT to have to make my own paintdelegate and
> in
> the final tree I will need to pit spinboxes, checkboxes, icons and sliters
> as
> well as text.
>
> The problem is seen on linux using gcc 4.4.3 and Qt 4.7.1
>
> Best and thanks in advance,
>    Morten
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101130/d4b53a19/attachment.html 


More information about the Qt-interest-old mailing list