Hi, I want to get the current text from line edit and return its containing text to another class without using a signal/slot button. This process needs to happen only once. I can't think of anyway to do it right now.
Thanks in advance.
Printable View
Hi, I want to get the current text from line edit and return its containing text to another class without using a signal/slot button. This process needs to happen only once. I can't think of anyway to do it right now.
Thanks in advance.
Quote:
Hi, I want to get the current text from line edit and return its containing text to another class without using a signal/slot button. This process needs to happen only once. I can't think of anyway to do it right now.
Code:
void get_the_current_text_from_lineedit_and_return_containing_text_to_another_class_without_using_a_signal_or_slot(QLineEdit* lineedit, AnotherClass* otherClass) { otherClass->DoSomething(text); }
You're welcome.Quote:
Thanks in advance.
Code:
void get_the_current_text_from_lineedit_and_use_it_in_the_other_classes_method(QLineEdit *lineedit, AnotherClass *otherClass) { otherClass->setTextThatCanBeUsedElsewhere(text); } void AnotherClass::setTextThatCanBeUsedElsewhere(const QString &txt) { m_textThatCanBeUsedElsewhere = txt; } void AnotherClass::doSomethingWithTextSetWithSetTextThatCanBeUsedElsewhere() { doSomethingWith(m_textThatCanBeUsedElsewhere); }
You're welcome.
By the way, how is this problem related to Qt?