×

Discussion Board

Results 1 to 14 of 14

Hybrid View

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    95

    problem with qt4.6 QwebView kinetic scrolling

    hi there;

    i am having a problem with QWebView's kinetic scrolling feature (added in qt libs v4.6).
    I created a simple qwebview based application and when I try to scroll a webpage (drag the page with finger) the text/content inside the page is selected instead of the page being scrolled (especially when you reach the buttom of the page and still try to scroll down with finger). this behavior prevents the page from being scrolled (since moving the finger on selected text stops the page scrolling).

    that behavior doesn't exist on other browsers (the default web browser/firefox for maemo) as content is not selectable (can't be highlighted) by user

    I tried to disable content editing by calling
    Code:
    ui->webView->page()->setContentEditable(false); // mentioned in Qwebpage's documentation page that it can disable text selection
    but it didn't work
    I couldn't find any APIs in Qwebview,qwebPage or QwebFrame that can disable the text/content selection.

    I also tried to play with the scrolling properties of the webview to make the scrolling more responsive (make the webview scroll as instant/fast as possible that the selection can't occur)
    Code:
    QAbstractKineticScroller *scroller = ui->webView->property("kineticScroller").value<QAbstractKineticScroller *>();
        if (scroller) {
    	scroller->setMode(QAbstractKineticScroller::AccelerationMode);
    	scroller->setPanningThreshold(3);
    	scroller->setDirectionErrorMargin(1);
         }
    but that didn't stop the content selection/highlighting from happening

    I am out of ideas, any hint/note is highly appreciated

    thanx in advance

  2. #2
    Registered User
    Join Date
    Mar 2009
    Location
    Foster City, CA
    Posts
    24

    Re: problem with qt4.6 QwebView kinetic scrolling

    Hi mismael,

    Have you tried this?
    This browser does work fine.

    http://qt.gitorious.org/+qt-develope...5/maemobrowser

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    95

    Re: problem with qt4.6 QwebView kinetic scrolling

    the example you mentioned doesn't used the QWebView Component, it uses QGraphicsWebView instead

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: problem with qt4.6 QwebView kinetic scrolling

    QWebPage::contentEditable is false by default. One possible workaround could be listening for selectionChanged signal and using findText() with empty string to clear selection.
    However, current behaviour is definitely a bug.

  5. #5
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: problem with qt4.6 QwebView kinetic scrolling

    Kinetic scrolling is working fine in Maemobrowser example, which is one of the default examples shipped with Qt
    http://qt.gitorious.org/+qt-develope...maemo5/webview
    The only thing it's using QGraphicsWebView instead of plain QWebView.
    Last edited by divanov; 2010-05-10 at 21:56. Reason: link was updated

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: problem with qt4.6 QwebView kinetic scrolling

    An article with a sample application demonstrating workaround is available in FN Wiki
    http://wiki.forum.nokia.com/index.ph...iew_on_Maemo_5

Similar Threads

  1. N97 kinetic scrolling and CustomItem's pointerDragged
    By shockreaction in forum Mobile Java General
    Replies: 4
    Last Post: 2010-03-06, 21:22
  2. How to implement kinetic scrolling?
    By svdwal in forum Symbian User Interface
    Replies: 8
    Last Post: 2010-01-28, 14:36
  3. When will 5800XM get kinetic scrolling?
    By stolidImran in forum General Development Questions
    Replies: 1
    Last Post: 2009-09-04, 07:48
  4. How to make kinetic scrolling effect on listbox?
    By Mozart2007 in forum Symbian
    Replies: 1
    Last Post: 2009-07-16, 05:08

Posting Permissions

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