Results 1 to 1 of 1

Thread: QTextBrowser does not show hand cursor for links if embedded inside a QGraphicsScene

  1. #1
    Join Date
    Apr 2012
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question QTextBrowser does not show hand cursor for links if embedded inside a QGraphicsScene

    Hi Folks,

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

    Qt Code:
    1. #include <QTextBrowser>
    2. #include <QGraphicsScene>
    3. #include <QGraphicsView>
    4.  
    5. int main(int argc, char *argv[])
    6. {
    7. QApplication a(argc, argv);
    8.  
    9. tb.setHtml("Here is a <a >link</a>.");
    10. gv.scene()->addWidget(&tb);
    11. gv.show();
    12.  
    13. return a.exec();
    14. }
    To copy to clipboard, switch view to plain text mode 
    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:

    Qt Code:
    1. #include <QTextBrowser>
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication a(argc, argv);
    6.  
    7. tb.setHtml("Here is a <a >link</a>.");
    8. tb.show();
    9.  
    10. return a.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 
    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
    Last edited by peers; 29th August 2012 at 17:25. Reason: made title clearer

Similar Threads

  1. Replies: 1
    Last Post: 23rd March 2012, 13:39
  2. CSS cursor property not working inside QWebView
    By ynonp in forum Qt Programming
    Replies: 1
    Last Post: 30th August 2011, 23:39
  3. Change cursor inside QTableview
    By big4mil in forum Qt Programming
    Replies: 4
    Last Post: 15th November 2010, 11:04
  4. Replies: 0
    Last Post: 27th July 2010, 12:48
  5. Hand Cursor by Style Sheet
    By smarinr in forum Qt Programming
    Replies: 1
    Last Post: 28th June 2008, 11:24

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.