×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    3

    Exclamation QWebView: cursor, drag&drop problem

    Hi all,

    i'm developing some small application that uses QWebView to show ui controls on top of my "real" contents. More or less it will be a picture viewer, with loaded picture from device's memory and drawn into backbuffer(QImage). In paint event i'm calling render() method from QWebFrame to draw ui controls on top of currently loaded picture.

    What i would like to achieve is to know where an user has just "clicked":
    a) on some html control(div) and then call suitable method from(for example exit)
    b) outside of any html control (on picture area) and grab mousePress, mouseMove and mouseRelease events (for further processing without using java script)

    I managed to find a way to do this by calling base QWebView event handling methods(mouseMoveEvent, mousePressEvent etc) in my app. If QWebView does not handle user action i know that i should process it by myself(and for example change viewport).

    My simple solution worked without problems in tp and beta version of qt 4.6. After switching to 4.6 release during changing viewport (case b above = outside any of html controls) my cursor changes in smt very similar to forbidden cursor ( http://qt.nokia.com/doc/4.6-snapshot/qcursor.html ) and my panning does not work at all. It happens in about 50% cases, i can not find any reason for it. What i already know is that, that mousePressEvent() and only the very first mouseMoveEvent() after him is called-nothing else afterwards...

    I tried to disable drag&drop feature by setAcceptDrops(false) in my QWebView's constructor but it does not work(cursor still is changing and mouse events are missing, anyway no drag related methods are called then).

    By enabling drag&drop by setAcceptDrops(true) i can see that dragEnterEvent() method is called always when i have a changing cursor problem(that is why i think it is smt related to drag&drop).

    I also tried to set QApplication::setStartDragDistance() and QApplication::setStartDragDistance() to some big values, but still with no effect...

    I'm using symbian 5th edition n97 v1.0 sdk, nokia n97 as a real testing device. On n97 i can not see the forbidden cursor, but mouse events are missing in the same way as using emulator.

    Does anyone has any idea what am i doing wrong? Why setAcceptDrops(false) seems not to work here?

    Regards

  2. #2
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: QWebView: cursor, drag&drop problem

    Hi, the forbidden cursor is a feature that was enabled by fixing a bug in the drag&drop.
    For rest why the drag even starts immediately... seems quite an annoyance. I've set manhattan length of drag to 8 pixels, but it seems like QWebView doesn't obey this rule or something went busted. You said you have panning, how do you achieve this?
    If you can report bug to http://bugreports.qt.nokia.com/ with test app/test case it would be very useful.

    -Janne

Similar Threads

  1. STLPort namespace issue
    By yickhong in forum Open C/C++
    Replies: 0
    Last Post: 2009-04-09, 08:54
  2. SyncML link problem
    By samuel_ in forum Symbian
    Replies: 4
    Last Post: 2009-03-27, 08:02
  3. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  4. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  5. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×