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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:28:47+00:00 2026-06-17T21:28:47+00:00

I have a Qt progam that I’ve made using Qt Creator. I made a

  • 0

I have a Qt progam that I’ve made using Qt Creator. I made a .ui dialog (mainwindow.ui), and in the ui editor add the controls and slots. These end up creating methods in mainwindow.cpp eg.

void MainWindow::on_btnRunJohn_clicked()

In these methods, I’m accessing the controls directly to update them eg.

ui->txtConfigFileName->setText("Some text to put in the text box");

I know there are numerous ways to manage window dialogs in Qt (eg. QML, subclassing), but am wondering whether this approach is suboptimal, or limits things in some way. Is this a reasonable way to code in Qt, or is there a better approach to managing dialogs? I’m happy defining the controls up front ie. I don’t need to add/delete controls 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-06-17T21:28:48+00:00Added an answer on June 17, 2026 at 9:28 pm

    Actually if you want to change the behavior of the Ui, this is the way you have to go.

    I suggest that you can use Multiple Inheritance, just like this:

    class A : public QDialog, public Ui::A
    {
        // class methods and members
    }
    

    This will help you to use the Ui widgets easly.

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

Sidebar

Related Questions

I have a program that gets a JSON from the server using getJSON and
I have a program that parses some XML using XML::Simple . It appears at
I have program that sends a file to a printer using 'lpr' command. I
as the title says, I have to make a prolog progam that solves the
An individual can have a progam id code assigned to them, but that code
I have a program that search some elements and show these on a GoogleMap.
I have a program that put all files in different folders, e.g. these files:
I have a program that i compiled and ran using third party lib on
I have program that opens subwindows inside of it (mdi.parent). I have made component
I have a program that runs on a server (using Jetty). I'm testing it

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.