How do I get GtkEntry widget from GtkComboBoxText in GTK4?

I have a GtkComboBoxText widget with an has-entry property.
When the user chooses from the combo box, the entry is updated and the text is shown selected.
I would like the text in the entry box not to be selected.

I was thinking about using the change signal of the combo-box to deselect the text in the associated GtkEntry widget.

How can I get the GtkEntry widget from the GtkComboBoxText?

In GTK3, there is a documented way to do this (gtk_bin_get_child()) but this is not available in GTK4.

Michael

Hi,

You can use Gtk.ComboBox.get_child to get the Entry.
(GtkComboBoxText inherits from GtkComboBox)