How to call function after window is shown?

前端 未结 9 1225
余生分开走
余生分开走 2020-12-05 06:21

Using Qt I create a QMainWindow and want to call a function AFTER the windows is shown. When I call the function in the constructor the fun

9条回答
  •  余生分开走
    2020-12-05 07:02

    Reimplement method void show() like this:

    void MainWindow::show()
    {
        QMainWindow::show();
        // Call your special function here.
    }
    

提交回复
热议问题