1

I have created a desktop application in Golang which I call a function

handleSection(layout *widgets.QVBoxLayout) 

which reads rows from a table in postgresql database, and for each row it creates a new

`widgets.NewQGroupBox2` 

and then add require widget to this Group fox and finally add GroupBox as widget to main layout(passed as argument).

Now, when the database table is updated I want to update this GUI component as well, But I am not able to find how to do this. Can some one tell me how to do that?

I have tried to return the address of *widgets.QGroupBox which contais all the Groupboxes at the end of for loop. and remove it using layout.removeWidget function, but it does not works.

Kamlesh Kumar
  • 351
  • 1
  • 7
  • Create a trigger which issues [NOTIFY](https://www.postgresql.org/docs/current/sql-notify.html) and setup your client app to `Listen` for the notification (channel). You can take the necessary action when the notification is received. – Belayer Feb 03 '23 at 20:03
  • Does notifying re-renders the application? – Kamlesh Kumar Feb 05 '23 at 17:59

0 Answers0