I’m trying to call a function when I click on an AdwActionRow element.
As of Adw.ActionRow :
AdwActionRowis unactivatable by default, giving it an activatable widget will automatically make it activatable, but unsetting it won’t change the row’s activatability.
Here is commented code:
## Here I create the ActionRow from an XML response
ActionRow = Adw.ActionRow(
icon_name="list-drag-handle-symbolic",
activatable="true",
title=child.find('name').text,
subtitle=(child.find('lastMessage')).find('message').text[:14]
)
## here I create my "activatable widget"
btn = Gtk.Button(label="Plz work")
## Connect it to my function
btn.connect("clicked", self.selectRoom)
# Then set it
ActionRow.set_activatable_widget(btn)
# Then I keep trying...
ActionRow.connect("activated", self.selectRoom)
# Finaly I add the ActionRow to it's final container
self.appFlowBox.append(ActionRow)
The problem: My function “selectRoom” is never called on ActionRow click in the UI.
Could someone give me some guidance ? I probably missed a core concept ![]()