[Qt-interest] Communication Problem

R. Reucher rene.reucher at batcom-it.net
Fri May 15 12:15:42 CEST 2009


On Fri May 15 2009 12:03:44 Sujan Dasmahapatra wrote:
> Dear friends
>
> I'm sorry this is a C++ question.
>
> I have two classes MainWindow and TableWidget.....I want to communicate
> in both directions.Can I include MainWindow in TableWidget and
> TableWidget in MainWindow.......Its giving error.......what is the
> solution can anyone plss tell me ??
It depends on what you mean by "communication".

Do you want to access members in an instance of one classe from an instance of 
the other class or what?

You should be able to #include them in both header files, but make sure not to 
#include them twice... a simple

#ifndef MYHEADER_H
#define MYHEADER_H
...
...
#endif

in the respective header files should dot the trick.

HTH, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/

"I appreciate the fact that this draft was done in haste, but some of
the sentences that you are sending out in the world to do your work for
you are loitering in taverns or asleep beside the highway."
		-- Dr. Dwight Van de Vate, Professor of Philosophy,
		   University of Tennessee at Knoxville




More information about the Qt-interest-old mailing list