Results 1 to 7 of 7

Thread: QGraphicsScene::items() Segmentation Fault

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsScene::items() Segmentation Fault

    What OS does it happen on?

    I would be guessing invalid scene pointer but you're saying that you're able to addRect() on it.

    Cna you create compilable example of the issue (without using UI files)?

  2. #2
    Join Date
    Feb 2012
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QGraphicsScene::items() Segmentation Fault

    I figured out the problem. It's not reflected in the example I put up here, but in my code I was getting the items from one scene and adding it to the main scene. It some instances, that first scene wasn't getting initialized before the method was called, which caused the error. So it was an invalid pointer.

    Thanks for the tip!

Similar Threads

  1. segmentation fault!!
    By Yayati.Ekbote in forum Qt Programming
    Replies: 4
    Last Post: 24th March 2010, 15:10
  2. segmentation fault
    By navid in forum Qt Programming
    Replies: 3
    Last Post: 20th December 2009, 11:40
  3. Segmentation fault
    By impeteperry in forum Qt Programming
    Replies: 5
    Last Post: 29th December 2008, 18:59
  4. Segmentation Fault
    By merry in forum General Programming
    Replies: 4
    Last Post: 12th March 2007, 04:08
  5. QGraphicsScene segmentation fault
    By maxpower in forum Qt Programming
    Replies: 2
    Last Post: 20th November 2006, 18:28

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.