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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:24:27+00:00 2026-05-20T13:24:27+00:00

Can i store the unspecified type in GtkListStore? For instance, I want to store

  • 0

Can i store the unspecified type in GtkListStore? For instance, I want to store in one field – the field of int type and the field of GdkColor type ?

  • 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-20T13:24:28+00:00Added an answer on May 20, 2026 at 1:24 pm

    Me asked that It will be set the G_TYPE_VALUE type of field

    #include <gtk/gtk.h>
    
    int main (int argc, char * argv[])
    {
      gtk_init(&argc, &argv);
    
      GtkListStore* store = gtk_list_store_new(1, G_TYPE_VALUE);
      GValue v = { 0 };
      GtkTreeIter iter;
      gtk_list_store_append(store, &iter);
      g_value_init(&v, G_TYPE_INT);
      g_value_set_int(&v, 10);
      GValue gv = { 0 };
      g_value_init(&gv, G_TYPE_VALUE);
      g_value_set_boxed(&gv, &v);
      gtk_list_store_set_value(store, &iter, 0, &gv);
    
      GValue gv2 = { 0 };
      gtk_tree_model_get_value((GtkTreeModel*)store, &iter, 0, &gv2);
      printf("gv2 holds %s\n", g_type_name(G_VALUE_TYPE(&gv2)));
      GValue * gv3 = (GValue*)g_value_get_boxed(&gv2);
      printf("gv3 holds %s\n", g_type_name(G_VALUE_TYPE(gv3)));
    
      int int_v = g_value_get_int(gv3);
      printf("int_v = %d\n", int_v);
    
      return 0;
    }
    

    I have followed this example from https://gist.github.com/867930

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

Sidebar

Related Questions

I want to know if I can store a field called flight_time this is
I want to find out how I can store small strings in an array
I have an application where users can store items. Now each type of account
I can store string of few length in char data type. But when it
How can store latin characters in appengine? (e.g. peña) when I want to store
parser.add_argument('-auto', action='store_true') How can I store false if -auto is unspecified? I can faintly
I want to make a database that can store any king of objects and
We can store Chinese character into mysql table Using this ( meta http-equiv=Content-type value=text/html;
Is there a way i can store a number locally? I want to make
We can store Connection String in Web.config file in two ways One is <connectionStrings>

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.