[Qt-interest] adressing something to the mainWindow from a dialog
R. Reucher
rene.reucher at batcom-it.net
Tue Apr 7 10:31:18 CEST 2009
On Tue April 7 2009 10:13:40 Giancarlo Amati wrote:
> Basically the question was if I have a class of mine derived from any of QT
> class I can always have the access to a pointer which points to the main
> windows/application as in MFC there is this mechanism while it doesn't
> exists expicitly in QT....
The QApplication can be accessed via the global pointer "qApp".
If you want to access public members in your "main widget" (whatever class
it's been derived from), you'd have to keep a global pointer for it thoughout
your project... how should Qt know about the role of any of your widgets? You
could even have several QMainWindow's.
Anyway, as far as I understand your question, it's still more C++ than Qt
related.
HTH, René
--
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/
Green light in a.m. for new projects. Red light in P.M. for traffic
tickets.
More information about the Qt-interest-old
mailing list