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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:59:35+00:00 2026-05-24T19:59:35+00:00

I have Qt SDK and Visual Studio Qt Add-In working in VS2008. I created

  • 0

I have Qt SDK and Visual Studio Qt Add-In working in VS2008. I created Qt UI project with main window class MainWindow. Double-click on mainwindow.ui opens Qt Designer. Then I added push button to the window, and called it pushButton. In Signals-Slots mode I managed to connect button’s clicked signal with MainWindow ButtonClicked slot. Signal/Slot editor looks like this:

Sender   pushButton
Signal   clicked()
Receiver MainWindowClass
Slot     ButtonClicked()

mainwindow.ui file was changed, reflecting this new information. However, mainwindow.cpp and mainwindow.h remain unchanged. I expect to see the place where I can add my own code. So, I added this code manually:

// mainwindow.h
...
protected slots:
    void ButtonClicked();

// mainwindow.cpp
void MainWindow::ButtonClicked()
{
    QMessageBox msgBox;
    msgBox.setText("Clicked");
    msgBox.exec();
}

It works, but I wonder whether this is correct way to do this. Is slot declaration and implementation supposed to be added manually, or I am missing something?

  • 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-24T19:59:35+00:00Added an answer on May 24, 2026 at 7:59 pm

    If you use signal/slot editor, you have to add these codes manually. Old Qt Add-In was automatically add these if you double click on a button from designer. Now Qt Designer is a seperate application. Double clicking is not possible.

    Also you can use automatic connections. With automatic connections you dont need to connect signals with slots. Functions which has special naming convention, automatically called. Like on_okButton_clicked.

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

Sidebar

Related Questions

I have Visual Studio 2008 and the Windows SDK for Windows Server 2008 and
I have Visual Studio 2008 (sp1, .NET 3.5). I have installed Silverlight 3 SDK
I have installed visual studio 2008 sp1, silverlight tools, silverlight sdk, silverlight toolkit 2009
I have make (Windows SDK), nmake (Visual Studio) and make (CodeGear) Which version of
I have a feeling that the Visual Studio SDK is targeted heavily towards the
Tech : Visual Studio 2010, Visual Studio Visualization & Modeling SDK We have a
I have a problem in Visual Studio 2010 Ultimate and WP7 SDK. I have
I have Visual Studio 2008 and Visual Studio 2010. I installed the SDK for
I have a third party SDK in C# which has class names like this:
Azure web role (MVC 3 project) wont' start with Twilio controller class I have

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.