I know that it is a recurrent theme, but I dont know to do this :
I want to pass two different widgets to a function into a class I have instantiated from main app.
The two different widgets can be Qlabel and /or QTextedit.
So, I'd want to have a function like this
Myfuntion(Qwidget a_widget) {
A_widget_to_remember=a_widget
.... }
Later in another function I want to do something with 'a_widget_to_remember'
if A_widget_to_remember=Qlabel ....
if A_widget_to_remember=QTextedit ....
1.- How I must to pass the label or Qtextedit to the function ?
Using pointers ? Can anyonbe give some easy code ?
2.- How can I identify what kind of Qwidget is 'A_widget_to_remember'
Thanks.
Bookmarks