Qt4.8 webview has keyevent problem



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.