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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:37:43+00:00 2026-06-11T21:37:43+00:00

I have 3 QLineEdits (say Name, Address & Phone No.), a QPushButton (Add button)

  • 0

I have 3 QLineEdits (say Name, Address & Phone No.), a QPushButton (Add button) and a QTableView.

When I have entered text in all the QLineEdits, and if I click the Add button, all 3 texts of the QLineEdits should be added in the first row of the QTableView.

How can I do this?

  • 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-11T21:37:44+00:00Added an answer on June 11, 2026 at 9:37 pm
    ...
    QStandardItemModel *model = new QStandardItemModel();
    model->setRowCount(3);
    
    yourTableView->setModel(model);
    
    connect(yourBtn, SIGNAL(clicked()), this, SLOT(addData()));
    ...
    
    void YourClass::addData()
    {
        QStandardItem *nameItem = new QStandardItem(nameEdit->text());
        QStandardItem *addressItem = new QStandardItem(addressEdit->text());
        QStandardItem *phoneItem = new QStandardItem(phoneEdit->text());
    
        QList<QStandardItem*> row;
        row << nameItem << addressItem << phoneItem;
    
        model->appendRow(row);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a QLineEdit , 2 QPush buttons (Add & Remove Buttons) and a
have 2 questions : A computer with 32-bit address uses 2-level page table (9
On a dialog I have a QLineEdit and a button. I want to enable
I have a QLineEdit inside a widget inside a QTabWidget. Let's say that tab
Lets say I have everything that is needed to promote a widget (I will
I have a series of QTextEdits and QLineEdits connected to a slot through a
I'm trying to get a pyside button to copy text from a qlineEdit field
I have a QLineEdit widget in my menubar which shows the text search by
I have a QLineEdit, and I want to set a placeholder text. When I
I have multiple QLineEdit widgets on a configuration widget. When the configuration text is

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.