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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:15:12+00:00 2026-06-16T00:15:12+00:00

This is my UI: This is tab created programmatically: ui->tabWidget->addTab(new QWidget(), Tab 2); I

  • 0

This is my UI:

enter image description here

This is tab created programmatically:

ui->tabWidget->addTab(new QWidget(), "Tab 2");

enter image description here

I want the newly created tab to have the exact same layout as the “Chat room” tab has. Any advice on how to do this would be great.

  • 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-16T00:15:12+00:00Added an answer on June 16, 2026 at 12:15 am

    The easiest way to do this (in Designer) is to create a new UI Form Class called something like ChatTab and base it on QWidget.

    Move (i.e., cut and paste) your chat room widgets and layout from your MainWindow UI form to the ChatTab form, but leave the QTabWidget container in your MainWindow form. If you want a chat room to be in your main window when it first opens, promote its first QWidget to a ChatTab from inside Designer.

    Any additional tabs should be added programatically like so:

    ui->tabWidget->addTab(new ChatTab(), "Tab 2");
    

    Add fancy stuff to the ChatTab constructor if you want to make your life easier.

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

Sidebar

Related Questions

I am new to this iphone development.I have created a tab bar application which
If I have a listener for changed tab like this: mTabHost.setOnTabChangedListener(new OnTabChangeListener() { public
I have created tab bar programmatically in the view controller. In my application, Initially
I have a tab bar controller that I have created programmatically, named TPastJourneyTabbar .
i have programmatically created a tab bar and added 7 view controllers to it
I want to create a tab/widget/thingymajiggy like the feedback-thing in this picture: That behaves
I have a file like this (tab delimited), but many lines 1314 0 0
i have this custom tab widget.. before i've customized it, by default i have
I have a TabBar which has been created programmatically. In the view controllers of
I created a new Tab Bar app project that gave me a FirstViewController.xib and

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.