Results 1 to 5 of 5

Thread: Crashing QGraphicsTextItem when updating HTML in PyQt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2019
    Posts
    12
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Crashing QGraphicsTextItem when updating HTML in PyQt

    Ahh, thank you, I see. It's strange that it didn't then crash when it started as there is the setHTML in the constructor. If there's no associated text document it seems that would have crashed it too.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,315
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Crashing QGraphicsTextItem when updating HTML in PyQt

    Probably QGraphicsTextItem is implemented with the optional ability to use a QTextDocument, and has a default means to simply use an HTML or simple text string if no document is set.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Oct 2019
    Posts
    12
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Crashing QGraphicsTextItem when updating HTML in PyQt

    Thank you for the help. I couldn't find why this was crashing, but I was able to convert it to a simpleTextItem which is sufficient for this particular purpose. I'll have to revisit later, though, because I'll need the more complex one later.

Similar Threads

  1. Extract data from HTML string in Python with PyQt WebView
    By PythonHelp in forum Qt Programming
    Replies: 2
    Last Post: 3rd March 2017, 15:15
  2. Replies: 5
    Last Post: 6th April 2015, 09:14
  3. Crashing without debug mode- No crashing with gdb debugger
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2011, 11:27
  4. Replies: 51
    Last Post: 26th November 2010, 13:24
  5. How to design one new browser(not for HTML) with PyQt
    By ubuntu in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2010, 03:49

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
  •  
Qt is a trademark of The Qt Company.