Quote Originally Posted by Cyrebo View Post
From the above it looks like you are getting the text and applying changes in one method. I need to use the line edit text in the other classes method.
Qt Code:
  1. void get_the_current_text_from_lineedit_and_use_it_in_the_other_classes_method(QLineEdit *lineedit, AnotherClass *otherClass) {
  2. QString text = lineedit->text();
  3. otherClass->setTextThatCanBeUsedElsewhere(text);
  4. }
  5.  
  6. void AnotherClass::setTextThatCanBeUsedElsewhere(const QString &txt) { m_textThatCanBeUsedElsewhere = txt; }
  7.  
  8. void AnotherClass::doSomethingWithTextSetWithSetTextThatCanBeUsedElsewhere() {
  9. doSomethingWith(m_textThatCanBeUsedElsewhere);
  10. }
To copy to clipboard, switch view to plain text mode 

You're welcome.

By the way, how is this problem related to Qt?