dannis
dannis

Reputation: 73

How to convert 'GtkWidget' type in gtk+ to the 'Gtk::Widget' type in gtkmm?

I simply tried this.

GtkWidget* oldwnd = new GtkWidget();
Gtk::Widget wnd(*oldwnd);

But it does not compile.

Can anybody tell me how to type cast the types in gtk+ to the corresponding types in gtkmm?

Upvotes: 1

Views: 2425

Answers (1)

n. m. could be an AI
n. m. could be an AI

Reputation: 120239

Perhaps Gtk::Widget* wnd = Glib::wrap(oldwnd)?

documentation says

Gtk::Widget* wrap (GtkWidget* object, bool take_copy=false);

Upvotes: 2

Related Questions