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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:19:07+00:00 2026-06-15T19:19:07+00:00

I know there are many many questions that are just the same, but none

  • 0

I know there are many many questions that are just the same, but none of them helps me:

class Form1 : public QMainWindow {
    Q_OBJECT
public:
    Form1();
    virtual ~Form1();
public slots:
    void langChange(const char* lang_label);
private:
    Ui::Form1 widget;
    void setLangStrings();
};

From1 constructor:

Form1::Form1() {
    widget.setupUi(this);
    connect(widget.btnL0, SIGNAL(clicked(bool)), this, SLOT(langChange("en")));
    connect(widget.btnL1, SIGNAL(clicked(bool)), this, SLOT(langChange("fr")));
    setLangStrings();
}

And I also have this langChange function implemented:

void Form1::langChange(const char* lang_label)
{
    GL_LANG = lang_label;
    setLangStrings();
}

I get this stupid error when the connect function is called:

No such slot Form1::langChange("sl") in Form1.cpp:15

I’m using NetBeans with QDesigner for the UI. I must say this QT4 is very difficult to learn.

  • 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-15T19:19:08+00:00Added an answer on June 15, 2026 at 7:19 pm

    You simply can’t connect SIGNAL with bool as argument to SLOT with const char* as argument. To do this kind of stuff you have to use QSignalMapper. You have an example how to use it inside documentation. In your case, it’s very simple, so you should handle it easly.

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

Sidebar

Related Questions

NOTE: I know there are many questions that talked about that but I'm still
I know that there are many Delphi database related questions available, but I'm considering
I know there are many questions similar but any of them didn't help. in
I know that there are many different questions about this sort of topic on
First of all: I do know that there are already many questions and answers
I know there are already many questions like mine but I found no answer
First things first, there are many questions similar to this, I know, but I
I know there are many other questions out there, but I can't seem to
I know there are multiple questions about this same question but I couldn't find
Firstly I know that there are many question and solutions to correct thread marshalling

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.