I'd like to insert an integer into a string QString, I tried
but it does not work, ideas? thank youCode:QMessageBox:: information (this, "about" "version" + Mn );
I'd like to insert an integer into a string QString, I tried
but it does not work, ideas? thank youCode:QMessageBox:: information (this, "about" "version" + Mn );
Code:QVariant tmpAe( listSE->getNode(i)->getData().getAge()); QString age( tmpAe.toString() );
First you must convert your whole year or char string "x" after you made the addition of former String with x, I do not know if it works on QT but I read on what works on traditional C + +. Check this example :
Code:QString sr; int j; sr.append(QString("%1").arg(j));
Code:#include <qlineedit.h> #include <qcombobox.h> ae::ae(QWidget* parent, const char* nm, WFlags fd) : Form1(parent,nm,fd) {} ae::~ae() {} void ae::ae() { QString TString; QVariant SLength; QString CString; TString = nameBox->text(); SLength = TString.length(); CString = SLength.toString(); }
Bookmarks