Active Topics

 


Reply
Thread Tools
hopbeat's Avatar
Posts: 516 | Thanked: 643 times | Joined on Oct 2009 @ Denmark/Poland
#1
Hello,

I have a problem with QListWidget that I embed in QGraphicsScene.
I try:

Code:
listWidget = new QListWidget();
QAbstractKineticScroller *scroller;
scroller = listWidget->property("kineticScroller").value<QAbstractKineticScroller *>();
scroller->setEnabled(true);
new QListWidgetItem("something", listWidget);
scene->addWidget(listWidget);
The list shows, but there are two problems:
-kinetic scrolling doesn't work (using scrollbar neither). Only using keys works.
-items are highlighted (and signals emitted) only on double press.

Any idea what may be wrong? And how this should be done?[/LIST]
__________________
Hi! I'm a Maemo Greeter!
Witaj na talk.maemo.org!

Useful links for newcomers:
Użyteczne linki:
Nowi użyktownicy mówią cześć | New members say hello , Tu zaczynają nowi użytkownicy | New users start here, Podforum społeczności | Community subforum, Wiki dla początkujących | Beginners' wiki page, Maemo5 101, Często zadawane pytania | Frequently Asked Questions (FAQ), Google

Jeżeli mogę w czymś pomóc, pytaj!
If I can help with anything else, just ask!

Bored? Follow me
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#2
hopbeat

by default most qt widgets have kinetic scrolling enabled by default that includes qlistwidget. this is qt4.6

you wouldnt need to implement an abstractscroller for that purpose.

what version do you use ?
 
hopbeat's Avatar
Posts: 516 | Thanked: 643 times | Joined on Oct 2009 @ Denmark/Poland
#3
@krk969, I have 4.6.2 20100128.
Yes, I know that this scrolling should be enabled by default, but it isn't. Adding scroller doesn't fix this.

There is QGraphicsView above this that handles mouse events. Maybe this interferes?
__________________
Hi! I'm a Maemo Greeter!
Witaj na talk.maemo.org!

Useful links for newcomers:
Użyteczne linki:
Nowi użyktownicy mówią cześć | New members say hello , Tu zaczynają nowi użytkownicy | New users start here, Podforum społeczności | Community subforum, Wiki dla początkujących | Beginners' wiki page, Maemo5 101, Często zadawane pytania | Frequently Asked Questions (FAQ), Google

Jeżeli mogę w czymś pomóc, pytaj!
If I can help with anything else, just ask!

Bored? Follow me
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#4
Originally Posted by hopbeat View Post
@krk969, I have 4.6.2 20100128.
Yes, I know that this scrolling should be enabled by default, but it isn't. Adding scroller doesn't fix this.

There is QGraphicsView above this that handles mouse events. Maybe this interferes?
yeah not sure, as on its own listwidtget and graphicsview they support the kinetic scrolling by default.
if that embedding is interfering, will have to try it out to say anything.
 
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#5
when will this awesome qt4.6 be integrated into N900? I can't wait to use all apps in Portrait mode with more eye candy UI
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#6
Originally Posted by maxximuscool View Post
when will this awesome qt4.6 be integrated into N900? I can't wait to use all apps in Portrait mode with more eye candy UI
there are apps using 4.6 available in extras-devel.
but thats how far it will go, they have blocked it for extras-testing as QT4.6 is still under development and so stays in extras-devel.

So, if you dont mind that risk , you can still have the fun
 
Posts: 289 | Thanked: 560 times | Joined on May 2009 @ Tampere, Finland
#7
Originally Posted by hopbeat View Post
Any idea what may be wrong? And how this should be done?
I'm not sure, but could this be related to your situation? http://bugreports.qt.nokia.com/browse/QTBUG-7761

Originally Posted by maxximuscool View Post
when will this awesome qt4.6 be integrated into N900? I can't wait to use all apps in Portrait mode with more eye candy UI
Qt 4.6 won't have any effect to the built-in applications, because they're GTK+/Hildon. It also won't automatically make existing Qt applications spin between portrait and landspace or have any whizzbang animations unless the developers have made it so.
 

The Following 3 Users Say Thank You to jsa For This Useful Post:
hopbeat's Avatar
Posts: 516 | Thanked: 643 times | Joined on Oct 2009 @ Denmark/Poland
#8
Setting:

Code:
QGraphicsView::mouseReleaseEvent(event);
event->ignore();
return;
and mousePressEvent, mouseReleaseEvent in proper mouse handlers for the context where I want the list to receive events doest fix the problem.
__________________
Hi! I'm a Maemo Greeter!
Witaj na talk.maemo.org!

Useful links for newcomers:
Użyteczne linki:
Nowi użyktownicy mówią cześć | New members say hello , Tu zaczynają nowi użytkownicy | New users start here, Podforum społeczności | Community subforum, Wiki dla początkujących | Beginners' wiki page, Maemo5 101, Często zadawane pytania | Frequently Asked Questions (FAQ), Google

Jeżeli mogę w czymś pomóc, pytaj!
If I can help with anything else, just ask!

Bored? Follow me
 
Posts: 434 | Thanked: 325 times | Joined on Sep 2009
#9
Have you tried to add a Dynamic Property called FingerScrollable (bool) to it?
 
Reply


 
Forum Jump


All times are GMT. The time now is 10:45.