pierrebai / QWidgetListWidget

Example of a Qt list widget containing complex sub-widgets.
MIT License
22 stars 6 forks source link

Widgets signals and slots #1

Closed shujaatak closed 4 years ago

shujaatak commented 4 years ago

I need label and two push buttons(edit, delete) in each list item, can you please mention how I would get and recognize the signals from those two buttons please?

pierrebai commented 4 years ago

Hi,

You created the buttons, so you should have access to the variables containing the button pointers. You can call connect with each button and connect the function to handle the signal you want. How to connect signal o handler is explained in Qt documentation.

-- Pierre


De : Shujaat Ali Khan notifications@github.com Envoyé : 18 juin 2020 17:26 À : pierrebai/QWidgetListWidget QWidgetListWidget@noreply.github.com Cc : Subscribed subscribed@noreply.github.com Objet : [pierrebai/QWidgetListWidget] Widgets signals and slots (#1)

I need label and two push buttons(edit, delete) in each list item, can you please mention how I would get and recognize the signals from those two buttons please?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/pierrebai/QWidgetListWidget/issues/1, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAB37V32JD6P4EWKFPVEL3LRXKA67ANCNFSM4OCFHKLA.

shujaatak commented 4 years ago

Thanks managed to do it.