C++ (Qt)void MyClass::MySlot(){ QLineEdit* le = qobject_cast<QLineEdit*>(sender()); if (le->text().size() > 0) { QMessageBox::warning(this, "xxx", "yyy!"); le->setFocus(); }}
QLineEdit* le = qobject_cast<QLineEdit*>(sender());if (le->text().size() > 0)