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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:20:20+00:00 2026-05-12T05:20:20+00:00

Currently I’m developing a multi-thread application. I use a TreeView to display the states

  • 0

Currently I’m developing a multi-thread application. I use a TreeView to display the states of each thread, one row per thread.
There are mainly two classes:

  1. Main GUI class containing TreeView
  2. class for thread handling

Passing Gtk::TreeModel::iterator as an argument to the second class is not viable since we cannot access the elements in row in formats like row[m_Columns.m_id].
Using Glib::Dispatcher is also unavailable since the elements we change in the external function is thread-specific.

So, is there any practical method to update GUI from external functions?

  • 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-12T05:20:20+00:00Added an answer on May 12, 2026 at 5:20 am

    It’s available to declare a class for Columns in an external file and include the file in both GUI class file and thread class file.

    Like

    class Columns : public Gtk::TreeModel::ColumnRecord
    {
    public:
        Gtk::TreeModelColumn<unsigned int> m_id;
        Gtk::TreeModelColumn<Glib::ustring> m_pin;
        Gtk::TreeModelColumn<Glib::ustring> m_name;
        Gtk::TreeModelColumn<unsigned int> m_percentage;
        Gtk::TreeModelColumn<Glib::ustring> m_status;
    
        Columns()
        {
            add(m_id);
            add(m_pin);
            add(m_name);
            add(m_percentage);
            add(m_status);
        }
    };
    

    So that if you created a Columns instance m_columns in GUI class, and passed it as a parameter to thread class, you can use

    (*row)[m_columns.m_id]
    

    to access the elements in TreeModel.

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

Sidebar

Related Questions

Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
Currently I am using HTML files for parts of my user interface. I display
currently, I`m implementing a map App with Mono4Droid and there I`m using a WebView
Currently I'm starting a new Activity and calling finish on a current one. Is
Currently I am trying to use a bunch of custom perl modules, test.pm as
Currently i have a node.js and socket.io application in development on my local machine
currently I'm developing an app for WP7 but came across a little problem with
Currently, I have a log file of messages in one table in a MySQL
Currently, I use an abstract factory to allow the specification of a custom class
I want use html5's new tag to play a wav file (currently only supported

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.