How to bind a GTKWindow in C++ code to the .UI file
- From: Arvind Arvind Pro <arvind_dev arvind pro>
- To: "gtkmm-list gnome org" <gtkmm-list gnome org>
- Subject: How to bind a GTKWindow in C++ code to the .UI file
- Date: Thu, 23 May 2019 16:29:10 +0530
Hi
I have a .UI file where a window with some custom widgets is declared.
Now the main window is named "main_win"
This is how the UI file is initialized in the main function of the application- the path+ name of UI
file is stored in the constant named "UI"
//Load the Glade file and instiate its widgets:
Glib::RefPtr<Gtk::Builder> builder;
try
{
builder = Gtk::Builder::create_from_file(UI);
}
catch (const Glib::FileError & ex)
{
std::cerr << ex.what() << std::endl;
return 1;
}
Gtk::Window* main_win = 0;
Now, my question is this-
How to link the GTK Window variable declared above- "main_win" with the window in the UI file and initialise it to show everything? I am sorry if this sounds like a newbie question :)
Any help would be appreciated:)
Yours sincerely,
Arvind.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]