Results 1 to 2 of 2

Thread: [ASK] QGraphicsScene->addItem() crash

  1. #1
    Join Date
    Oct 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [ASK] QGraphicsScene->addItem() crash

    Hi all,

    I create graphic bar chart using GraphicView framework. I derive QGraphicsItem to create the bar chart, and this bar chart is added to the scene using QGraphicsScene::addItem().

    I get error (crash), but I'm not sure whether it's caused when the item is added to the scene or in the painting process. This happens intermittently.

    The error says:

    Qt Code:
    1. ASSERT: "width > 0.0" in file painting\qrasterizer.cpp, line 710
    To copy to clipboard, switch view to plain text mode 


    Please advise.

  2. #2
    Join Date
    Nov 2011
    Posts
    2
    Qt products
    Qt4

    Default Re: [ASK] QGraphicsScene->addItem() crash

    Hello,

    I'm running Qt 5.3.2 on Windows 8 and from drawing some vertical lines using QGraphicsLineItem I am getting a similar crash in debug runs occasionally (about once every five runs):

    Qt Code:
    1. ASSERT: "width > 0.0" in file painting\qrasterizer.cpp, line 773
    To copy to clipboard, switch view to plain text mode 
    Are there any recommendations on how to handle this?

    Thank you

Similar Threads

  1. scene->addItem() moans about QTimer ???
    By enno in forum Qt Programming
    Replies: 5
    Last Post: 17th December 2010, 15:02
  2. Crash gracefully? No crash!
    By lni in forum Qt Programming
    Replies: 0
    Last Post: 7th July 2010, 04:59
  3. Segmentation Faul using addItem (QListWidget)
    By gnusar in forum Qt Programming
    Replies: 3
    Last Post: 8th November 2008, 10:27
  4. QListWidget::addItem and display immediately
    By vlg789 in forum Qt Programming
    Replies: 6
    Last Post: 24th September 2007, 16:30
  5. "userdata" field in addItem in QComboBox
    By amulya in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2007, 13:15

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.