[Qt-interest] QGesture Behavior Inconsistencies
Sean Hayes
sean.t.hayes at vanderbilt.edu
Tue Feb 22 15:25:41 CET 2011
The more I look at this issue, the more I believe it to be a major bug in
the Qt Gesture System. Also, the lack of feedback here leads me to believe
that no one has found a workaround. I have created a bug report at
http://bugreports.qt.nokia.com/browse/QTBUG-17610. I have tried to better
clarify the issue there. One widget type preventing event propagation of
sibling widgets is a very significant problem. I would appreciated any help.
Also, please vote for this bug to be address quickly.
Thank you,
Sean
On Mon, Feb 21, 2011 at 9:21 PM, Sean Hayes <sean.t.hayes at vanderbilt.edu>wrote:
> I have attached a small example to better explain what I am talking about.
> If the QScrollArea is removed by commenting out lines 20-22 of
> MainWindow.cpp, the gestures are received correctly. With the QScrollArea
> included, gesture do not work over any child widgets (although you can get a
> gesture to come through if you touch exactly in the margins/spacing between
> child widgets). Received gesture information is output to the console.
>
> Is this a bug with Qt? Any suggestions on how to get around this?
>
> I am using Qt 4.7.1 with Windows 7.
>
> Thank you,
> Sean
>
>
> On Mon, Feb 21, 2011 at 5:04 PM, Sean Hayes <sean.t.hayes at vanderbilt.edu>wrote:
>
>> I have a QWidget, A, that grabs a gesture. The gesture accepts a variable
>> number of touch points. Widget A has a layout with several children that do
>> not grab gestures themselves. If none of these child widgets inherit
>> QAbstractScrollArea, then the gestures behave as expected. No mater where on
>> widget A you add a finger it gets grouped in the same QTouchPoints set and
>> is added to the same QGesture. However, if any one of the child widgets
>> inherit QAbstractScrollArea, additional touch points can only be added if
>> they originate on the same child widget. It is as if I set grabGesture() on
>> each child widget instead of just widget A. Why is this? Any ideas on how to
>> fix this?
>>
>> Have tried calling
>> QAbstractScrollArea::viewport()->setAttribute(Qt::WA_AcceptTouchEvents),
>> which allows it to "grab gestures" incorrectly like all the other child
>> widgets, but new touch points still cannot added outside of the child
>> widget.
>>
>> Thank you for your help,
>> Sean
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110222/50be0041/attachment.html
More information about the Qt-interest-old
mailing list