문제

I'm trying to load a very basic Glade file from the same directory. However, Gtk::Builder always fails and aborts with

terminate called after throwing an instance of 'Gtk::BuilderError'

even though I surrounded everything in a try statement.

Just for clarity, the source is at http://pastebin.com/hRBuAi2d, and the glade file at http://pastebin.com/c9ZvgbWi.

Is the Gtkmm I have broken? That's the only reasoning I can come up with.

도움이 되었습니까?

해결책

After changing id="window1" to id="mainwindow" in your ui file, it ran fine here.

You are trying to ref_builder->get_widget('mainwindow', win) where your window is actually called "window1" in the ui file.

Edit: though I am on Linux x64, not windows.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top