You are not logged in.

1

Monday, June 11th 2012, 8:12am

How to call sub class

I CREATED
MainWindow::function1()
{

}
how can i use some function i next form(sub class);

2

Monday, June 11th 2012, 9:44am

Do you know that sub class refers to inheritance?

I doubt that you have a sub class of MainWindow...


Additionally, your question is a pure C++ one, not a Qt one. Please go to the appropriate forum or research some basics of c++.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

3

Friday, June 15th 2012, 7:27am

How to call sub class

I taking about QT , i am doing project in Qt

I created MainWindow.h and i called MainWindow.cpp ---Form 1(ui)

i need the same function in -- (feet.cpp Form-2 (ui) ) , In same project --it is possible ? , kindly guide me.

thanks










Do you know that sub class refers to inheritance?

I doubt that you have a sub class of MainWindow...


Additionally, your question is a pure C++ one, not a Qt one. Please go to the appropriate forum or research some basics of c++.

This post has been edited 1 times, last edit by "srinuprasad" (Jun 15th 2012, 7:46am)


4

Friday, June 15th 2012, 8:44am

just because you are using Qt doesn't mean that your question is about qt programming.


You seem to have be learning c++, so I advise you to go to the c++ section or a more popular c++ forum.

Your question has nothing to do with Qt programming by the looks of it.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.