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

  • Home
  • SEARCH
  • 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 8404341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:34:31+00:00 2026-06-09T22:34:31+00:00

My project consists of operations between geometric figures on a cartesian plane.I would include

  • 0

My project consists of operations between geometric figures on a cartesian plane.I would include a graph that have to be updated after each operation.

Thats the source:

http://pastebin.com/s5Fu9dHJ

I’ve created the wrapper “disegna” (: public QWidget) because of I am sending to display everything as separate widgets (I have a widget for the virtual keyboard, another for Qlineedits, etc.) and I need an QWidget object can be used with view-> addWidget (QWidget,int,int) because I cannot pass directly a QMainWindow object.

The Program run with no errors,but no “hello world” is drawed (and no blank-space for istance QGraphicView is created).

where am I doing it wrong?

  • 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-06-09T22:34:32+00:00Added an answer on June 9, 2026 at 10:34 pm

    Change

    QGraphicsView view(&scene);
    view.show();
    

    to

    QGraphicsView * view = new QGraphicsView(&scene);
    view->show();
    

    The way you have it now, the instance of QGraphicView is allocated on the stack and gets destroyed right after the disegna constructor is executed, that’s why you can’t see it.

    Don’t forget to free the memory.

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

Sidebar

Related Questions

If I have a java project that consists of several different types of files
I have a project that consists of a bunch of dynamically loaded modules. Originally,
I have a VB6 project that is using a SQL2008 database. The project consists
I have a project that consists of multiple projects, something like: my_project\ proj_A\ (code,
I have a project that consists of various modules. Basically, I've worked with Spring
I have a project that I want to build using automake. The project consists
I have a project in SVN that I'm migrating to Git. The project consists
My project consists of an app that links to two static libraries. Each of
I have two tables: projects and tasks. A project consists of tasks. I want
Basically I have a series of projects displayed on the page. Each project consists

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.