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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:43:24+00:00 2026-06-08T06:43:24+00:00

I have a QWidget B which is contained inside a QWidget A. QWidget A

  • 0

I have a QWidget B which is contained inside a QWidget A. QWidget A has a QLabel. I have some data inside QWidget B, which I want to set as the value of the QLabel. How can something like this be done?

  • 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-08T06:43:26+00:00Added an answer on June 8, 2026 at 6:43 am

    First of all, if I understand your topic correctly, you have your own derivations of QWidget for A and B.

    The clean solution to your problem is that B emits a signal, like newLabelText(QString text);.
    Then, A provides a slot setLabelText(QString text);. You connect the signal to the slot and you are done.

    In this solution, only one entity needs to know both A and B to perform the Signal/Slot-Connection, while A and B do not have to know each other, or mangle with each other.

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

Sidebar

Related Questions

I want to make an application with plugins that also can have plugins (which
I have a QWidget where I am drawing some lines and I would like
I have a class which displays waveform data of audiofiles in a QWidget (see
I have a thread which produces some data (a python list) and which shall
I have a QGraphicsScene on which I would like to draw some special curves.
I have a custom QWidget A, which contains another custom QWidget B. I want
Let's consider we have QWidget that contains QTableWidget (only). So we want to resize
I have the following structure: QScrollArea - QWidget (with QHBoxLayout) - QLabel - QLabel
I have a class like this class GUI : public QWidget, public QThread When
I have a widget class subclass of QMainWindow, and it has a central widget(QWidget),

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.