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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:16:15+00:00 2026-05-12T17:16:15+00:00

I have a Main window build with Qt Designer and I also have a

  • 0

I have a Main window build with Qt Designer and I also have a widget built with Qt designer (both in a separate ui file). How can I instantiate my widget into my mainwindow at runtime?

  • 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-12T17:16:15+00:00Added an answer on May 12, 2026 at 5:16 pm

    The easiest way (using Designer) is to open your main window, drag a QWidget into it, and position/name the QWidget like you would your custom widget. Once that is done, right-click on the QWidget, and select Promote to…. A dialog will show up with the widgets it can be promoted to. At the bottom of that dialog, you can add a new widget for promotion. Type in the class name and include file information, and add that widget. Then select the entry in the list, and click the Promote button.

    At the end of this process, you should be able to recompile, and your custom widget will be where you placed it in the main window.

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

Sidebar

Related Questions

I have a main window class built in Qt Designer and called Ui_MainWindow which
I have an application with a main window that loads in text file(s) and
I have a main menu window. On clicking any menu item it opens a
I have a window(say main window) with a frame which has a page in
I have a page viewer as main window showing an external page as we
i have a mvvm app that the main window is a tab control. i
Suppose I have thread 1, the main window UI thread and thread 2, a
I have a UserControl which contains a TextBox . When my main window loads
I have module application. When I run it, the main window of that app
Ok, i have 2 edit controls and a button in my main window; in

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.