Hello to everybody,
After preparing some widgets, I tried to collect them in a one-page program (mainwindow), using QStackedWidget. No problem with it, loading of my different widgets work well, but I have a difficulty with two pages: these widgets call a SELECT function to the same database (as “SELECT employer FROM Company” and “SELECT department FROM Company”), showing data in their UI using QTableWidget. The result of the calling of two instances of database seems to be that both the tables are loaded, but in the first the QTableWidget appears empty, while in the second is all OK. It’s enough that I operate on the first table (for example, with a sorting) to reload the data, and having a right behavior.
Of course, this is not caused by QStackedWidget, as I obtain the same result forcing, in main.cpp, the open of both these widgets.
How is possible to update the data after the widgets are staked in mainwindow?
Thanks for any suggestion!