Home > Mobile >  Qt how internally QWidget which MainWindow know who you are
Qt how internally QWidget which MainWindow know who you are

Time:03-23

If only a MainWindow can obtain the MainWindow pointer by means of a global pointer, this is no problem,

If there can be multiple MainWindow is there a way to tell very inner QWidget in which MainWindow and call the MainWindow of public methods? Primary search is not a good way to level up,,, to rewrite a Widget class can save MainWindow Pointers can't compatible with other base class is QWidget form, have what good method?

CodePudding user response:

Const QWidget * QWidget: : window ()
  •  Tags:  
  • Qt
  • Related