c++ - Incompatible cv qualifiers in parent class method -
i'm tinkering c++ , gtkmm, trying create custom class calls upon .glade file build gtk rather basic interface. class derived gtk::window
, when call get_widget
method on class itself, error:
types ‘const t_widget*’ , ‘myclass* const’ have incompatible cv-qualifiers
class definition:
class myclass: public gtk::window{ public: myclass(); protected: //... glib::refptr<gtk::builder> builder; //... }
however trying upload data glade file class (on class constructor):
//... builder = gtk::builder::create_from_file("../glade/myclass.glade"); builder->get_widget("window1",this); //...
myclass* const
not same const myclass*
. in first 1 pointer constant, , in second 1 object is. declare : const myclass*
but problem seems unrelated (my bad), gtk has special function derived class : gtk::builder::get_widget_derived, use instead.
Comments
Post a Comment