| Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
I compiled: qt-x11-commercial-src-4.4.0-snapshot-20080312 and compiled
tested my
application with this version.
Now it seems that the QGraphicsItem hoverEvents do not work anymore.
The hover event works correctly (how I expect them to work) with Qt 4.3.2 /
Qt 4.3.4.
I use the hoverEvent to change the cursor when moving over an item like:
JQItem::JQItem() : QAbstractGraphicsShapeItem()
{
setAcceptsHoverEvents(true);
setFlag(ItemIsSelectable);
setFlag(ItemIsMovable);
...
}
void
JQItem::hoverEnterEvent(
QGraphicsSceneHoverEvent *
)
{
setCursor(Qt::SizeAllCursor);
}
void
JQItem::hoverLeaveEvent(
QGraphicsSceneHoverEvent *
)
{
unsetCursor();
}
It seems that these hover members are not called anymore. Any idea what can
be the problem?
Henk Jan Priester wrote:> I compiled: qt-x11-commercial-src-4.4.0-snapshot-20080312 and compiled > tested my > application with this version. > Now it seems that the QGraphicsItem hoverEvents do not work anymore. > The hover event works correctly (how I expect them to work) with Qt 4.3.2 > / Qt 4.3.4. Hi, Henk. Could you please try to isolate this problem, and post a standalone program that reproduces the bug? -- [ signature omitted ]
2008/3/14, Andreas Aardal Hanssen <ahanssen_replytolistplease@xxxxxxxxxxxxx
>:
>
> Henk Jan Priester wrote:> I compiled:
>
> qt-x11-commercial-src-4.4.0-snapshot-20080312 and compiled
> > tested my
> > application with this version.
> > Now it seems that the QGraphicsItem hoverEvents do not work anymore.
> > The hover event works correctly (how I expect them to work) with Qt
> 4.3.2
> > / Qt 4.3.4.
>
>
> Hi, Henk. Could you please try to isolate this problem, and post a
> standalone program that reproduces the bug?
Andreas,
I verified with a simple example program I used for 144734 but that works
fine.
What I see in the code is there is a big difference between 4.3 and 4.4.
I my program have implemented my own:
QGraphicsScene::mouse{Press/Move/Release}Event functions
which are not calling the default implementation.
In 4.4 it looks that an hoverEvent might be generated in the
QGraphicsScene::mouseMoveEvent function.
Could that explain why it does not work?
If I have some time I can try to make a example.
Henk Jan
--
[ signature omitted ]
2008/3/14, Andreas Aardal Hanssen <ahanssen_replytolistplease@xxxxxxxxxxxxx >: > > Henk Jan Priester wrote:> I compiled: > > qt-x11-commercial-src-4.4.0-snapshot-20080312 and compiled > > tested my > > application with this version. > > Now it seems that the QGraphicsItem hoverEvents do not work anymore. > > The hover event works correctly (how I expect them to work) with Qt > 4.3.2 > > / Qt 4.3.4. > > > Hi, Henk. Could you please try to isolate this problem, and post a > standalone program that reproduces the bug? I have created a simple program. The problem is caused I have implemented QGraphicsScene::mouseXXX routines. In this example these are just dummy routine but I my program they do actualy something. (needed undo/redo on move/resize operations, needed a different ways for selecting elements) When using 4.3.4 the hoverEvent for the item are generated and when using QT 4.4 20080312 they are not generated. Henk Jan -- [ signature omitted ]
Attachment:
qrect.tgz
Description: GNU Zip compressed data
Henk Jan Priester wrote: > 2008/3/14, Andreas Aardal Hanssen >> Hi, Henk. Could you please try to isolate this problem, and post a >> standalone program that reproduces the bug? > When using 4.3.4 the hoverEvent for the item are generated and when using > QT 4.4 20080312 they > are not generated. Hi, Henk. Sorry for the late answer, I'll look at this and get back to you with an answer. -- [ signature omitted ]