Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6767249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:55:42+00:00 2026-05-26T14:55:42+00:00

Good day! With Qt 4.7.3 an example below crashes at QGraphicsScene::~QGraphicsScene() call: #include <QCoreApplication>

  • 0

Good day!

With Qt 4.7.3 an example below crashes at QGraphicsScene::~QGraphicsScene() call:

#include <QCoreApplication>
#include <QGraphicsScene>

int main( int argc, char* argv[] )
{
    // replace this with QObject app; and no problems
    QCoreApplication app( argc, argv );

    new QGraphicsScene( &app );

    return 0;
}

Any ideas?

UPDATE:

Bug report created.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:55:43+00:00Added an answer on May 26, 2026 at 2:55 pm

    When a QGraphicsScene instance is constructed it appends itself in a list stored in a private member of the single QApplication instance, and when it is deleted, it also remove itself from that list:

    QGraphicsScene::~QGraphicsScene()
    {
        Q_D(QGraphicsScene);
    
        // Remove this scene from qApp's global scene list.
        qApp->d_func()->scene_list.removeAll(this);
    
        ...
    }
    

    When the application object is destroyed, the inherited base class’ destructors are called recursively, so, ~QApplication() calls ~QCoreApplication() which itself calls ~QObject().

    The actual deletion of child objects is done in ~QObject().
    Which means that at the time the scene object is destroyed, all the QApplication members are already destroyed, so ~QGraphicsScene() crashes when it tries to access the list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day. I found the example below, I need to append some more text
Good day, If I have for example the documents which have the following fields
Good day, I was playing with the example found here on SO: PHP Socket
Good day! For this example of function html() http://api.jquery.com/html/ How to return to link
Good day! I'm practising materials from Ruby on Rails Tutorial by Michael Hartle. Below
Good day. I try to add new tab with navigation controller to my app.
Good day, We just converted our web application .NET 1.1 to .NET 2.0. We
Good day, I'm having a problem with asp.net 2.0 viewstate. Basically, I want to
Good day, In visual studio 2005, when I drop a webcontrol in the designer,
Good Day All we are trying to do is inside a trigger make sure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.