Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTextBrowser does not show hand cursor if embedded inside a QGraphicsScene via a QGraphicsProxyWidget
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.1k Views 1 Watching
  • 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.
  • P Offline
    P Offline
    PeerS
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved