Hi All,
I have created three classes, of which one is inherited from QMainWindow and other two are inherited from QWidget. I have designed the GUI using QT Designer. The classes are as follows.
MainWindow - inherited from QMainWindow.
wrapperSDKParams - inherieted from QWidget
wrapperLog - inherieted from QWidget
Now inside MainWindow class I have created objects of the rest of the two. Now I want to send a message from object of wrapperSDKparams to wrapperLog. How can I do it ? Please help me.
{
Q_OBJECT
private:
wrapperLog *log;
public:
MainWindow();
void AddActions();
void AddMenus();
void initErrors();
//void addError(QString *error);
public slots:
void displayForm();
void displayErrors();
};
class wrapperSDKParams
: public QWidget,
private Ui
::sdk_params{
Q_OBJECT
private:
unsigned int debug_flag;
public:
wrapperSDKParams
(QWidget *parent
= 0);
void setDefault();
void updateDebugFlag();
public slots:
void setDefaultValues();
void enableGroupBox();
void start_SDK();
};
class wrapperLog
: public QWidget,
private Ui
::frmLog{
Q_OBJECT
public:
};
class MainWindow : public QMainWindow
{
Q_OBJECT
private:
QWorkspace *workspace;
QMenu *initMenu;
QMenu *viewMenu;
QAction *initAction;
QAction *viewAction;
wrapperLog *log;
public:
MainWindow();
void AddActions();
void AddMenus();
void initErrors();
//void addError(QString *error);
public slots:
void displayForm();
void displayErrors();
};
class wrapperSDKParams : public QWidget, private Ui::sdk_params
{
Q_OBJECT
private:
unsigned int debug_flag;
public:
wrapperSDKParams(QWidget *parent = 0);
void setDefault();
void updateDebugFlag();
public slots:
void setDefaultValues();
void enableGroupBox();
void start_SDK();
};
class wrapperLog : public QWidget, private Ui::frmLog
{
Q_OBJECT
public:
wrapperLog(QWidget *parent = 0);
void append(QString error);
};
To copy to clipboard, switch view to plain text mode
I want to call append from wrapperSDKParams.
Bookmarks