Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt4.8 webview has keyevent problem

    General and Desktop
    1
    1
    472
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hhacker last edited by

      hi there,
      My environment is qt4.8 with win7,and I was using webview(inherits QGraphicsWebView) to display flashes,the problem is flash *can not receive keyboard event *anyway ,I have checked element if it has focus by these codes:
      @
      QWebHitTestResult hit = page()->mainFrame()->hitTestContent(pressPoint.toPoint());
      qDebug()<<hit.element().hasFocus(); //false
      QGraphicsWebView::mousePressEvent(event);
      hit = page()->mainFrame()->hitTestContent(pressPoint.toPoint());
      qDebug()<<hit.element().hasFocus(); //true
      @
      flash object do has focus when I clicked in flash area,somehow it didn't receive any keypress events.
      I have tried to compile it with Qt 5.2,and it didn't have this bug.
      I can't port my project to Qt 5.2 for some reason.
      Is there anyway to fix this bug?any advice will be helpful,thanks for help.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post