-
I do not read or speak Chinese. This is what Google translate gives me:
When I initialize and set the initial value of lineEdit and textEdit in the window below, the program crashes directly!
LineEdit's setText and textEdit's setPlainText are not working. I don't know what caused the problem.You will need to post your code and the stack back trace from your debugger.
Google translate:您将需要从调试器发布您的代码和堆栈回溯。
-
Here are some of my code and program crashes:
AddCreativeDlg::AddCreativeDlg(QWidget *parent) : QDialog(parent), ui(new Ui::AddCreativeDlg) { ui->setupUi(this); Qt::WindowFlags flags= this->windowFlags(); setWindowFlags(flags&~Qt::WindowContextHelpButtonHint); m_str_title = ""; m_str_des1 = ""; m_str_des2 = ""; m_str_def_visturl = ""; m_str_def_showurl = ""; m_str_mobile_visturl = ""; m_str_mobile_showurl = ""; m_str_def_visturl = "regDomainName"; m_str_def_showurl = m_str_def_visturl; m_str_mobile_visturl = "mobileDomainName"; m_str_mobile_showurl = m_str_mobile_visturl; ui->lineEdit_creativeTitle->setFixedWidth(300); ui->showUrl->setFixedWidth(300); ui->showUrl->setFixedHeight(30); ui->visitUrl->setFixedWidth(300); ui->visitUrl->setFixedHeight(30); ui->showMobUrl->setFixedWidth(300); ui->showMobUrl->setFixedHeight(30); ui->visitMobUrl->setFixedWidth(300); ui->visitMobUrl->setFixedHeight(30); ui->textEdit_creativeLine1->setFixedWidth(300); ui->textEdit_creativeLine1->setFixedHeight(50); ui->textEdit_creativeLine2->setFixedWidth(300); ui->textEdit_creativeLine2->setFixedHeight(50); /*textEdit or lineEdit have the same problem*/ ui->visitUrl->setPlainText(m_str_def_visturl); //here is normal. ui->showUrl->setPlainText(m_str_def_visturl); //here is crash. ui->visitMobUrl->setPlainText(m_str_mobile_visturl); ui->showMobUrl->setPlainText(m_str_mobile_showurl); InitMyEdit(); //This function is used to set initial values for several other lineedit or TextEdit. }