Error Cannot Convert TextView to GtkWidget



I am trying to play with GNote since it is based on Gtkmm.

I typed this:

gtk_widget_modify_base(m_editor, GTK_STATE_NORMAL, mihColor);

Then I got this error message:

error: cannot convert ‘Gtk::TextView*’ to ‘GtkWidget*’ for argument ‘1’ to ‘void gtk_widget_modify_base(GtkWidget*, GtkStateType, const GdkColor*)’


Why is that?
As learned in Qt if QTextEdit is inherited from QWidget then I do not have to convert it.
Is it the same case with Gtkmm? I think this is one of the advantages of inheritance in C++.

Thank you,
Mohammad


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]