1. You clearly want to pass a pointer to your object, otherwise how can you keep track of it? Also, you might want to have a look at overloaded functions.
  2. There are different possible approaches, depending exactly on what you want to do, how generic a solution you want it to be. The easiest would be to have two different variables in your class, one for QLabel and another for QTextEdit, and a flag that tells you which should be used.