Reply
Thread Tools
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#11
Well, the docs say:

QTextEdit and QPlainTextEdit are fully Maemo 5 style guide compliant. This means that these widgets will not show scrollbars, will not allow the user to select text and will not have kinetic scrolling enabled by default.

QAbstractKineticScroller *scroller = scrollArea->property("kineticScroller") .value<QAbstractKineticScroller *>();
if (scroller)
scroller->setEnabled(false);

Khertan, does this solve the issue ?
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following User Says Thank You to attila77 For This Useful Post:
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#12
From documentation:
"Qt for Maemo 5 already comes with two implementations for QAbstractScrollArea and QWebView, and those kinetic scrollers are automatically instantiated and attached to these widgets on creation.In the QAbstractScrollArea case, the kinetic scroller is initially disabled. However, for QAbstractItemView and QScrollArea derived classes it is enabled by default. You can obtain these automatically created objects via a dynamic property:"

The last three lines of code quoted by attilla are then given. Thought I would give the full context.
__________________
aspidites | blog | aspidites@inbox.com
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#13
Originally Posted by attila77 View Post
Well, the docs say:

QTextEdit and QPlainTextEdit are fully Maemo 5 style guide compliant. This means that these widgets will not show scrollbars, will not allow the user to select text and will not have kinetic scrolling enabled by default.

QAbstractKineticScroller *scroller = scrollArea->property("kineticScroller") .value<QAbstractKineticScroller *>();
if (scroller)
scroller->setEnabled(false);

Khertan, does this solve the issue ?
Hi !

i didn't found where this QAbstractKineticScroller class is located in PyQt ... it s doesn't seems to exist.

Any advice ? Or maybe it s something not supported yet in PyQt ?
 

The Following User Says Thank You to Khertan For This Useful Post:
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#14
@Khertan: Couldn't find it in PyQt4, but it's in PySide. (QtGui)
__________________
aspidites | blog | aspidites@inbox.com
 

The Following User Says Thank You to aspidites For This Useful Post:
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#15
Hum ... i ll try to switch to pyside so
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#16
Oops. If it's not there, I might have overwritten it when migrating to git... I'll report back with details later.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#17
Fujin:~/MyDocs/Projects/khteditor$ python khteditor.py
Segmentation fault

switch to PySide
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#18
Originally Posted by attila77 View Post
Oops. If it's not there, I might have overwritten it when migrating to git... I'll report back with details later.
Ah ok ... thx ...
 
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#19
Originally Posted by Khertan View Post
Fujin:~/MyDocs/Projects/khteditor$ python khteditor.py
Segmentation fault

switch to PySide
PySide doesn't like super() (from what I've experimented with), so you'll have to do SuperClass.__init__(). For example, QMainWindow.__init__(parent)
__________________
aspidites | blog | aspidites@inbox.com
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#20
Originally Posted by aspidites View Post
PySide doesn't like super() (from what I've experimented with), so you'll have to do SuperClass.__init__(). For example, QMainWindow.__init__(parent)
Ok due to bug #226 it s not possible yet with pyside ...

It s works with the last PyQt4 binding available in extras-devel.

Thx to achipa who help me a lot ... in fact who found what s the problem was and give the solution :

qte = QtGui.QTextEdit()
scroller = qte.property("kineticScroller").toPyObject()
scroller.setEnabled(True)
 

The Following User Says Thank You to Khertan For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 02:47.