Best way to unset set_tooltip_text

Cosmetic issue

set_tooltip_text("");
set_tooltip_text(Glib::ustring());
set_tooltip_text(); // error
set_tooltip_text(NULL); // error

I don’t like constructions like "" or Glib::ustring(), maybe some other methods available to unset ustring based setters?

In this case you can use set_has_tooltip(false), if you think that’s better than
set_tooltip_text(“”).

It would be reasonable to declare set_tooltip_text() and set_tooltip_markup()
with a default value.

Gtk::Widget_set_tooltip_text(const Glib::ustring& text = {});
Gtk::Widget_set_tooltip_markup(const Glib::ustring& markup = {});

You can file a gtkmm issue or merge request if you like.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.