Hello Everyone,
I am working with Qt in order to display the text obtained from the return statement of a function.
So I have a function of type Stat init(), where Status is a typedef struct which contains code and error messages of type char *.
My function looks like this
Stat init()
{
stat msg;
msg.code = ERROR; //ERROR is a enum
if(.......)
{
msg.errorcode = "some message";
}
return msg;
}
This function is inside a .cpp file.
Now I have an another file named MainWindow.cpp.
In this file I include the header file of the above file, so that I can use stat init() function. Now I should display the msg in a messagebox like a warning or an information. Can someone give me an idea how I can set text such that it gets the information from Stat init().
Thank you.
Bookmarks