[Qt-interest] how to access the Member Variable of MainWindow from another class?

Muthulingam Ammaiappan muthulingam.a at gmail.com
Tue Apr 12 11:43:59 CEST 2011


Hi Friends,

i am facing the following problem...

how i can access the variable which is declared in the mainwindow class from
some other class constructor?


code snippet:

class MainWindow : public QMainWindow
{
Q_OBJECT

public:
MainWindow(QWidget *parent = 0);
~MainWindow();

public:
QList<int> cno_airfoilgeom;
QList<int> sno_airfoilgeom;

};

class AirfoilGeomTab : public QWidget
{
Q_OBJECT

public:
AirfoilGeomTab(QWidget *parent = 0);

};

i wanted to use the "cno_airfoilgeom" variable in the "AirfoilGeomTab"
constructor...

AirfoilGeomTab::AirfoilGeomTab(QWidget *parent)
: QWidget(parent)
{

// i wanted to use the "cno_airfoilgeom" variable here

}

can anyone please help me...?

Thanks in Advance,
mammaiap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110412/cce5b732/attachment.html 


More information about the Qt-interest-old mailing list