Hello! Friends,
I am working in WinXP with Qt4.3.4. I have designed a GUI for getting square of a given number. I have following files: -
1.)sample.ui
2.)sample.h
3.)sample.cpp
4.)ui_sample.h
5.)main.cpp
6.)square.h
7.)square.cpp
From these 5th & 6th are simple .cpp files for calculating square of the number which am passing from sample.cpp. Like getting input from GUI & passing it to square.cpp and displazing the result.
Am able to set the calculated value from sample.cpp. But i want to set the resultLineEdit->text() from square.cpp to the calculated value.
I have inherited in square.cpp from ui_sample class, and tried to include ui_sample.h in square.cpp to set text() property, it shows me an error that: -
{
square.cpp: In static member function `static int Square::Square_of(int)':
./ui_sample.h:34: error: invalid use of member `Ui_Form::resultLineEdit' in stat
ic member function
square.cpp:8: error: from this location
}
I might be wrong in doing few things. Can anyone please help me out in this problem.
I will be thankful
Bookmarks