![]() |
FingerScrollable in Qt 4.6
Hi,
I m currently trying to fix the issue that come with qt4.6. The context: i start the dev of a new texteditor using qt4.5 and pyqt. At the moment i have a really simple editor, in qt4.5 the fingerscrollable was working. Since i update to qt4.6 and last pyqt this doesn't work anymore. I just use a qtextedit in a qframe. From what i understand from qt bug tracker it s not a bug to not have fingerscrollable QTextEdit widget but a feature ... Maybe someone can help me ? source are on http://gitorious.org/khteditor/ (the qtextedit is located in editor.py) Other question : why my toolbar button isn t working too ? (located in editor_window.py) Thx a lot, |
Re: FingerScrollable in Qt 4.6
If you were using c++, you could use code of the imtk project. It looks like it supports kinetic scroll areas where you can put widgets inside.
http://gitorious.org/imtk/imtk/blobs...c/scrollarea.h |
Re: FingerScrollable in Qt 4.6
I don't care about Maemo-related bugs from April 15th, because most of them have roots in buggy Qt 4.6.2. If they'll stay here after PR1.2, then I'll fix or work around them.
Anyway I can neither consider my applications stable nor promote it to extras-testing before it. |
Re: FingerScrollable in Qt 4.6
Toolbar works fine for me. I'm playing with the code right now, but I think there are some parenting issues going on.
[edit] As per platform notes kinetic scrolling is implemented in all widgets that inherit from QAbstractKineticScroller Have to head to work, else I'd whip up a patch for you. |
Re: FingerScrollable in Qt 4.6
Hi i see your gitourious patch ...
Thx |
Re: FingerScrollable in Qt 4.6
What make me fear about the future of the use of Qt for things other than fart apps is things like that ...
http://bugreports.qt.nokia.com/brows...mment-tabpanel |
Re: FingerScrollable in Qt 4.6
Quote:
It seems to me that they answered the bug politely and handled the issue according to the specifications. FingerScrollable works for me with the controls that it is intended to work with. |
Re: FingerScrollable in Qt 4.6
|
Re: FingerScrollable in Qt 4.6
Quote:
I didn't understand ...they answer that not having a fingerscrollable QTextEdit is a feature ... i didn't found that very polite as it was a working under 4.5 ... why removing it ... This is like saying that user doesn't have to see files extensions so we remove it from all gtk dialog without letting dev to choose ... yeah right ... but one stupid case ... for a texteditor, oh i choose from my folder source.py or source.pyo ... you just see source and source :) The case seems similar to me ... but maybe i didn't understand well ... |
Re: FingerScrollable in Qt 4.6
reading the documentation it seems the feature is available through inheritance and is just disabled by default. busy now but will look into this later
|
Re: FingerScrollable in Qt 4.6
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 ? |
Re: FingerScrollable in Qt 4.6
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. |
Re: FingerScrollable in Qt 4.6
Quote:
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 ? |
Re: FingerScrollable in Qt 4.6
@Khertan: Couldn't find it in PyQt4, but it's in PySide. (QtGui)
|
Re: FingerScrollable in Qt 4.6
Hum ... i ll try to switch to pyside so :)
|
Re: FingerScrollable in Qt 4.6
Oops. If it's not there, I might have overwritten it when migrating to git... I'll report back with details later.
|
Re: FingerScrollable in Qt 4.6
Fujin:~/MyDocs/Projects/khteditor$ python khteditor.py
Segmentation fault switch to PySide :) |
Re: FingerScrollable in Qt 4.6
Quote:
|
Re: FingerScrollable in Qt 4.6
Quote:
|
Re: FingerScrollable in Qt 4.6
Quote:
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) |
Re: FingerScrollable in Qt 4.6
Cool.
BTW, 226 is a duplicate of 207, which has been fixed upstream. |
Re: FingerScrollable in Qt 4.6
yep... ...
|
Re: FingerScrollable in Qt 4.6
Quote:
Appears that this does not work as it should on QPlainTextEdit() When using that exact same method the scrolling is so sensitive that you only have to move your finger a few pixels to scroll from top to bottom of a pretty long list. Is this a bug or a feature? Changed to QTextEdit and everything was peachy, so it's not really a problem for me now. |
Re: FingerScrollable in Qt 4.6
Probably a Qt bug, but if you take a look at the QAbstractKineticScroller object, you have methods for adjusting various scroll parameters.
|
| All times are GMT. The time now is 02:47. |
vBulletin® Version 3.8.8