QTextBrowser does not show hand cursor if embedded inside a QGraphicsScene via a QGraphicsProxyWidget



  • Hi Folks,

    I've got a QTextBrowser which I added to a QGraphicsScene via a QGraphicsProxyWidget:

    @
    #include <QTextBrowser>
    #include <QGraphicsScene>
    #include <QGraphicsView>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);

    QTextBrowser tb;
    tb.setHtml("Here is a <a >link</a>.");
    QGraphicsView gv(new QGraphicsScene);
    gv.scene()->addWidget(&tb);
    gv.show();

    return a.exec();
    }
    @

    The text is properly displayed and also the link works. What is not working is that the mouse cursor changes to the hand cursor when hovering over the link.

    Everything works fine when not embedding the QTextBrowser inside the QGraphicsScene:

    @
    #include <QTextBrowser>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);

    QTextBrowser tb;
    tb.setHtml("Here is a <a >link</a>.");
    tb.show();

    return a.exec();
    }
    @

    What I am doing wrong or what I am missing?

    Is this maybe a limitation of the Graphics View Framework and especially of the QProxyWidget?

    Any help would be appreaciated :)

    Thanks a lot!
    Peer


Log in to reply
 

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