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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:33:33+00:00 2026-05-14T06:33:33+00:00

Being resonably new to using GTK+, im not fully aware of all its functionality.

  • 0

Being resonably new to using GTK+, im not fully aware of all its functionality.

Basically, I have a GtkTreeView widget that has 4 Columns. I need to update the text displayed in the 4 columns every couple of seconds, but im not aware how to do this in GTK+.

I’m aware that I could flush the data using gtk_tree_store_clear, but I’m not sure how to repopulate the columns and have the top level window refresh to show this new data?

  • 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-14T06:33:34+00:00Added an answer on May 14, 2026 at 6:33 am

    You need to get a GtkTreeIter to the proper row, then use the appropriate (model-specific) setter to change the data.

    For instance gtk_list_store_set() for the GtkListStore model.

    There is no need to clear the entire model if you just want to change some of the data, that is very wasteful and slow.

    If you really need to change all the data, then sure, clear it.

    You don’t have to worry about getting the display to refresh; the view listens to events from the model, and automatically knows to refresh when the model changes.

    UPDATE:

    When changing the data (as described in commment), you don’t need to “flush” the old data. The model owns the data, and knows how to keep track of the memory used. You just use the above-mentioned gtk_list_store_set() call as necessary to put the new desired data in the model. You can do this as often as necessary, and an update frequency of once every few seconds should be no problem at all.

    Of course, in such a case, to keep your application (which I assume is single-threaded, for simplicity) responsive, you must have a way to asynchronously trigger an update, perhaps using a timer. Have a look at glib’s g_timeout_add() function to learn how to add a simple global timer.

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

Sidebar

Related Questions

Being relatively new to the .net game, I was wondering, has anyone had any
Being new to test based development, this question has been bugging me. How much
Being really new to wx, I'm wondering if there is an IDE (especially for
Being a Windows developer I'm currently working on my own project using LAMP. I
Being fairly new to JavaScript, I'm unable to discern when to use each of
I'm reasonably new to using the QT framework in combination with C++. I was
We have a project using LINQ to SQL, for which I need to rewrite
I have a method I am using to execute a command on the local
I have a typical HABTM relationship between members (actual members of our organization, not
Being stuck with a legacy database schema that no longer reflects your data model

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.