hi to all, I've centos7.5 and Qt 5.7 in VM. I am trying to get child (lineEdit) from parent. I tried like this :-
void dialogAddNewRecord
::insert_intoDB(QString *name, qint32
*stock, qint32
*rate, qint32
*number
) {
logindlg = new dialogLogin(this);
QLineEdit *uname_l
= logindlg
->findChild<QLineEdit
*>
("lineEditUserNameLoginForm");
QString uname
= uname_l
->text
().
trimmed();
qDebug() << "uname = " << uname;
qDebug() << uname_l;
}
void dialogAddNewRecord::insert_intoDB(QString *name, qint32 *stock, qint32 *rate, qint32 *number)
{
logindlg = new dialogLogin(this);
QLineEdit *uname_l = logindlg->findChild<QLineEdit*>("lineEditUserNameLoginForm");
QString uname = uname_l->text().trimmed();
qDebug() << "uname = " << uname;
qDebug() << uname_l;
}
To copy to clipboard, switch view to plain text mode
this shows following output:-
uname = ""
QLineEdit(0x1c323e0, name
="lineEditUserNameLoginForm")
uname = ""
QLineEdit(0x1c323e0, name="lineEditUserNameLoginForm")
To copy to clipboard, switch view to plain text mode
how to get child lineEdit in form.
Bookmarks