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

List:       kde-devel
Subject:    Re: Using KCategorizedView
From:       Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date:       2012-10-10 16:56:00
Message-ID: CAOjaSmi8SXM3R25sSh26MqEQd=vfiF1F94AS5Xx4U0HsRhdPpA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Oct 10, 2012 at 8:31 AM, Ben Cooksley <bcooksley@kde.org> wrote:

> On Tue, Oct 9, 2012 at 7:36 PM, Pierre Stirnweiss
> <pstirnweiss@googlemail.com> wrote:
> > On Mon, Oct 8, 2012 at 11:57 PM, Ben Cooksley <bcooksley@kde.org> wrote:
> >>
> >> On Tue, Oct 9, 2012 at 8:27 AM, Pierre Stirnweiss
> >> <pstirnweiss@googlemail.com> wrote:
> >> > Hello everybody,
> >>
> >> Hi Pierre,
> >>
> >> >
> >> > As I am new to this list, first a little introduction:
> >> > My name is Pierre Stirnweiss. I am french and 37 years old and
> currently
> >> > live in Munich, Germany. I work on Calligra Words.
> >> >
> >> > Now to the stuff:
> >> >
> >> > I am having problems using the KCategorizedView.
> >> >
> >> > Here is the code: http://paste.kde.org/564680/
> >> >
> >> > The code is used in Calligra Words for the StylesManager dialog.
> >> >
> >> > What happens is:
> >> >
> >> > The items are properly displayed on opening the dialog. However, if I
> >> > scroll
> >> > the viewport with the mouse wheel, nothing happens. If I scroll it
> using
> >> > the
> >> > scrollbar's cursor, it starts by scrolling the items, then when the
> last
> >> > one
> >> > is reached, I can continue scrolling, but again, only the first items
> >> > are
> >> > displayed.
> >> > Also it seems that subSortLessThan is never called. lessThan neither
> >> > actually.
> >> >
> >> > If i use a normal QListView, or if I don't setCategorizedModel(true),
> >> > the
> >> > viewport scrolls normally. Sorting does not happen either.
> >> >
> >> > I have already lost a lot of hair on this and hope somebody can help
> me.
> >>
> >> I notice you have not set a Category Drawer, which could be the cause of
> >> this.
> >> You may find the code in IconMode::initWidget() in
> >> kde-workspace/systemsettings/icons/IconMode.cpp to be helpful here.
> >>
> >> >
> >> > PierreSt
> >> > Calligra Words developer
> >>
> >> Regards,
> >> Ben Cooksley
> >>
> >> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> >> unsubscribe <<
> >
> >
> > Thanks for your answer. The KCategoryDrawer is created line 666 and set
> line
> > 670 (of the paste). Do I need to implement a special one? The category
> title
> > is actually properly drawn (AFAICS)
>
> Oops, missed that. I do see that you have parented the drawer to the
> KCategorizedView though.
> As a wild guess - try not parenting the KCategoryDrawer instances to
> their respective views - I can't recall exactly but there might have
> been a problem with doing that as otherwise I wouldn't have deleted it
> by hand in the IconMode code in System Settings.
>
> >
> > PierreSt
>
> Regards,
> Ben
>

Unfortunately it didn't work.

I will try with a simpler underlying model to see if i still have the weird
behaviour.

PierreSt

[Attachment #5 (text/html)]

<div class="gmail_quote">On Wed, Oct 10, 2012 at 8:31 AM, Ben Cooksley <span \
dir="ltr">&lt;<a href="mailto:bcooksley@kde.org" \
target="_blank">bcooksley@kde.org</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">


<div><div>On Tue, Oct 9, 2012 at 7:36 PM, Pierre Stirnweiss<br>
&lt;<a href="mailto:pstirnweiss@googlemail.com" \
target="_blank">pstirnweiss@googlemail.com</a>&gt; wrote:<br> &gt; On Mon, Oct 8, \
2012 at 11:57 PM, Ben Cooksley &lt;<a href="mailto:bcooksley@kde.org" \
target="_blank">bcooksley@kde.org</a>&gt; wrote:<br> &gt;&gt;<br>
&gt;&gt; On Tue, Oct 9, 2012 at 8:27 AM, Pierre Stirnweiss<br>
&gt;&gt; &lt;<a href="mailto:pstirnweiss@googlemail.com" \
target="_blank">pstirnweiss@googlemail.com</a>&gt; wrote:<br> &gt;&gt; &gt; Hello \
everybody,<br> &gt;&gt;<br>
&gt;&gt; Hi Pierre,<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; As I am new to this list, first a little introduction:<br>
&gt;&gt; &gt; My name is Pierre Stirnweiss. I am french and 37 years old and \
currently<br> &gt;&gt; &gt; live in Munich, Germany. I work on Calligra Words.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Now to the stuff:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I am having problems using the KCategorizedView.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Here is the code: <a href="http://paste.kde.org/564680/" \
target="_blank">http://paste.kde.org/564680/</a><br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; The code is used in Calligra Words for the StylesManager dialog.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; What happens is:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The items are properly displayed on opening the dialog. However, if \
I<br> &gt;&gt; &gt; scroll<br>
&gt;&gt; &gt; the viewport with the mouse wheel, nothing happens. If I scroll it \
using<br> &gt;&gt; &gt; the<br>
&gt;&gt; &gt; scrollbar&#39;s cursor, it starts by scrolling the items, then when the \
last<br> &gt;&gt; &gt; one<br>
&gt;&gt; &gt; is reached, I can continue scrolling, but again, only the first \
items<br> &gt;&gt; &gt; are<br>
&gt;&gt; &gt; displayed.<br>
&gt;&gt; &gt; Also it seems that subSortLessThan is never called. lessThan \
neither<br> &gt;&gt; &gt; actually.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; If i use a normal QListView, or if I don&#39;t \
setCategorizedModel(true),<br> &gt;&gt; &gt; the<br>
&gt;&gt; &gt; viewport scrolls normally. Sorting does not happen either.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have already lost a lot of hair on this and hope somebody can help \
me.<br> &gt;&gt;<br>
&gt;&gt; I notice you have not set a Category Drawer, which could be the cause of<br>
&gt;&gt; this.<br>
&gt;&gt; You may find the code in IconMode::initWidget() in<br>
&gt;&gt; kde-workspace/systemsettings/icons/IconMode.cpp to be helpful here.<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; PierreSt<br>
&gt;&gt; &gt; Calligra Words developer<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Ben Cooksley<br>
&gt;&gt;<br>
&gt;&gt; &gt;&gt; Visit <a \
href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" \
target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to<br> \
&gt;&gt; &gt;&gt; unsubscribe &lt;&lt;<br> &gt;<br>
&gt;<br>
&gt; Thanks for your answer. The KCategoryDrawer is created line 666 and set line<br>
&gt; 670 (of the paste). Do I need to implement a special one? The category title<br>
&gt; is actually properly drawn (AFAICS)<br>
<br>
</div></div>Oops, missed that. I do see that you have parented the drawer to the<br>
KCategorizedView though.<br>
As a wild guess - try not parenting the KCategoryDrawer instances to<br>
their respective views - I can&#39;t recall exactly but there might have<br>
been a problem with doing that as otherwise I wouldn&#39;t have deleted it<br>
by hand in the IconMode code in System Settings.<br>
<br>
&gt;<br>
&gt; PierreSt<br>
<br>
Regards,<br>
Ben<br></blockquote></div><br>Unfortunately it didn&#39;t work.<br><br>I will try \
with a simpler underlying model to see if i still have the weird \
behaviour.<br><br>PierreSt<br><br>



>> 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