A QMainwindow object is created and displayed () n in the main () function of the program. This object constructor is used to create all GUI widgets. It contains additional code (or a method call) that is currently being executed before the QMainWindow widget appears.
This code / method should be run once after the QMainWindow constructor, that is, when the application window is visible.
According to the showEvent documentation, you can run it more than once.
Do I need to use any switch flag inside this event, or is there a "better" solution (I thought I read that QTimer can be used to set event loop cycle methods)?
source
share