How I Can change text on the button
-
I have function
@void RepeatQuestion@
and when i want to change the text on the button, that don't work. I tried
@Ui_MainWindow.pushButton->SetText("")@ @Ui_MainWindow->pushButton->SetText("")@ @Ui::MainWindow.pushButton->SetText("")@
and
@Ui::MAinWindow->pushButton->SetText("")@ -
Could you post MainWindow declaration.
If you use MainWindow that was created by QtCreator wizard then
@
ui->pushButton->setText("Hello");
@ -
When i write @ ui->@ i see "ui is not declarate"
-
Could you post MainWindow declaration.
-
-
There is no MainWindoww include in the source file.
@
#include "MainWindoww.h"
@ -
-
void ReWriteQuestion(string files) is not a part of MainWindoww.
That is why you are getting "ui is not declared".Add it to the MainWindoww declaration and change the definition accordingly.
-
How :( ?
-
@
class MainWindoww : public ......
{
.....
void ReWriteQuestion(string files)
.....
};
@@
void MainWindoww::ReWriteQuestion(string files)
{
......
ui->pushButton->setText("C++ rocks");
......
}
@ -
Thank You, mean :)