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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:37:04+00:00 2026-05-31T06:37:04+00:00

Im a student programmer and Im using Qt to build a GUI for one

  • 0

Im a student programmer and Im using Qt to build a GUI for one of my company’s product. Essentially this GUI is going to read certain files and feed the data into a table for users to edit. I know how to construct the QTableWidget statically. In which case i used the following:

 for(int x=0; x < ui->tableWidgetInjectionLocations->rowCount(); x++)
    {
        for(int y=0; y < ui->tableWidgetInjectionLocations->columnCount(); y++)
        {
            ui->tableWidgetInjectionLocations->setItem(x,y, qTableWidgetItemInjection);
        }
    }

The problem is this way creates a static or fixed number of cells I would instead like the cells to be constructed based on the user interaction. Perhaps when a user fills any cells in the last line to populate a new one or when the user scrolls down… I digress the thing is I haven’t been able to find any documentation on how to approach this in Qt Documentation. Maybe its writers block or I’m missing something obvious but any help would be awesome. Thanks for reading and thanks for any help in advance.

  • 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-31T06:37:06+00:00Added an answer on May 31, 2026 at 6:37 am

    To add a row, just do a QAbstractItemModel::insertRowon your QTableWidget::model().
    The QTableWidget will adjust itself automatically.

    i.e.

    ui->tableWidgetInjectionLocations->model()->insertRow(ui->tableWidgetInjectionLocations->model()->rowCount());
    

    to add a row after the last one.

    There are tons of way to trigger the append, you’d have to be more precise on what you want…

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

Sidebar

Related Questions

I am a student programmer using Qt to build a GUI for work. I
I am a student programmer and I am using Qt to build a GUI
I am currently a student programmer using Qt to build a GUI inteface at
I'm a student programmer and I am using Qt to build some GUI applications
I'm a student programmer and I am using Qt to build a GUI for
I'm a student programmer and I am using Qt to build a GUI application.
I am a student programmer using Qt to develop a GUI application. I am
I am student programmer and I am using Qt to develop a GUI interface
I am a student programmer using Qt to build a reader Table for my
I am a student programmer currently designing a GUI for my company with Qt

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.