I have two classes: A and B.
Class A contains all the user interface (QPushButtons, QTextEdit, ...), while class B contains the implementation and functionallity of the program.
How can B for example change the text of a button in class A ?
I have two classes: A and B.
Class A contains all the user interface (QPushButtons, QTextEdit, ...), while class B contains the implementation and functionallity of the program.
How can B for example change the text of a button in class A ?
Originally Posted by probine
Create an object of A in class B and then through that object call the
obj->pushButton->text("Button Name");
it would do it for you.
The object that I have to create:
in class B:
______________
A* a;
a->btn->setText("hello");
_________________
Post more code please !!!
In class B: -Originally Posted by probine
[HTML]
A *a_obj = new A;
a_obj->button->text("hello");
[/HTML]
also dont forget to include the A in your code.. You will have to convert it into header file (A.h) and then include it in you B.cpp...
This would do it for you...
Bookmarks