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 9218091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:47:01+00:00 2026-06-18T02:47:01+00:00

I use Qt designer to design the UI. When implementing the design into the

  • 0

I use Qt designer to design the UI. When implementing the design into the code, I use the multiple inheritance approach. There’s no real reason why I use this method, I just found it to be easier.

Anyway, when I looked into the generated header file I noticed in the setupUi() function that everything is allocated in heap. I don’t really need the objects to outlive it’s parent and according to this, in my case, it shouldn’t be allocated in heap.

In situations where the parent object is just a small modal dialog allocated in stack, wouldn’t it be a waste that it’s UI objects are allocated in heap?

Is there a work-around for this? Should I just stop worrying? I haven’t found a situation where this has become a problem but I’m still curious about it. In fact, it’s not a problem at all. I just want to know.

  • 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-18T02:47:02+00:00Added an answer on June 18, 2026 at 2:47 am

    General Qt practice is to use heap allocation for any QObject unless it’s lifetime is limited to the current scope. This may seem wasteful, but in the context of building a UI any performance impact will be negligible.

    Also note that due to Qt’s extensive use of the pimpl idiom, every created QObject has an internal QObjectPrivate which is always heap allocated, so it’s simply not possible to keep everything on the stack.

    So I would suggest that you stop worrying. 🙂

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

Sidebar

Related Questions

I am a novice designer who could just use HTML to design my own
I'm writing an application that lets the end use design a Form just the
I use the Qt Designer to design .ui files and compile them in my
I am implementing Code Generation for WindowsForm control at Design-Time, using a Custom CodeDomSerializer.
Is there a software that would enable graphic designer to use JSF GUI components
I'd like to use the .NET settings designer/framework to create application settings at design
I use Qt designer to make an interface and I have an QWebView in
can I force the DBML designer to use my custom types instead of the
I'm attempting to use the DataSet designer to create a datatable from a query.
Recently our newest web designer asked me why we use ASP.NET for our website.

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.