maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Kinetic QScrollArea (mainly PyQt) (https://talk.maemo.org/showthread.php?t=60569)

mikaelh 2010-08-18 04:39

Kinetic QScrollArea (mainly PyQt)
 
By default, it seems that QScrollArea is "finger scrollable" but not "kinetic", and the user experience is much worse than the standard scrollers in Maemo Gtk. I understand that there is a "kineticScroller" property for QScrollArea. I would like to try this but cannot find the proper documentation anywhere.

Please share if you know where the documentation is, or if you have a good (PyQt) example of usage.

Twidi 2010-08-18 06:33

Re: Kinetic QScrollArea (mainly PyQt)
 
You may try this:

Code:

scroller = mywidget.property("kineticScroller").toPyObject()
if scroller:
    scroller.setEnabled(True)


mikaelh 2010-08-18 10:32

Re: Kinetic QScrollArea (mainly PyQt)
 
Thanks! I also finally found the dynamic property introspection method in QObject, which helps. But I still wonder where all(?) of these Maemo add-ons are actually documented.

attila77 2010-08-18 10:38

Re: Kinetic QScrollArea (mainly PyQt)
 
The Qt for Maemo documentation:

http://doc.qt.nokia.com/qt-maemo-4.6...es-maemo5.html

The toPyObject() method is documented in the PyQt documentation:

http://www.riverbankcomputing.co.uk/.../pyqt4ref.html

mikaelh 2010-08-18 11:33

Re: Kinetic QScrollArea (mainly PyQt)
 
Excellent, thanks.

Seems like the documentation does not completely reflect the version of PyQt on N900 today, as I am getting an error for a missing property when trying to set the axis threshold, for example.

attila77 2010-08-18 12:47

Re: Kinetic QScrollArea (mainly PyQt)
 
Hm, can you post an example ? Make sure you're looking at Qt4.6 docs, not 4.7 or mobility.

mikaelh 2010-08-18 13:54

Re: Kinetic QScrollArea (mainly PyQt)
 
I am looking at 4.6 documentation at:
http://doc.qt.nokia.com/qt-maemo-4.6...cscroller.html

And the code is:

scroller = mywidget.property("kineticScroller").toPyObject()
if scroller:
scroller.setEnabled(True)
scroller.setAxisLockThreshold(1.0)

setEnabled fine, setAxisLockThreshold not found, axisLockThreshold not found.

Thanks,
+ Mikael

attila77 2010-08-18 14:42

Re: Kinetic QScrollArea (mainly PyQt)
 
Hm, that might actually be a bug in my PyQt port, let me check.

Khertan 2010-08-20 15:27

Re: Kinetic QScrollArea (mainly PyQt)
 
Just a tips :

I use ipython and help() (interactive help) as a documentation ... it s really help to find differences with the documentation sometimes :)


All times are GMT. The time now is 07:35.

vBulletin® Version 3.8.8