cannot change main window title
a very basic and simple question which is puzzling me
i want to change the title of the main window in my qt application (the GUI has been designed by Qt Design so I have the ui. and setupui() stuff)
Code:
MainWindow
::MainWindow(QWidget *parent
) :{
QString windowTitle
("some good stuf here");
QMessageBox::information(this, progName, windowTitle
);
//....
this->setWindowTitle(windowTitle); // ???
ledGreen.load(":/bitmap/LED-Green-20.bmp");
ledRed.load(":/bitmap/LED-Red-20.bmp");
ledDark.load(":/bitmap/LED-Dark-20.bmp");
ui.setupUi(this);
//....
}
can't understand what is wrong here ...
thanks much
Re: cannot change main window title
Code:
MainWindow
::MainWindow(QWidget *parent
) :{
QString windowTitle
("some good stuf here");
QMessageBox::information(this, progName, windowTitle
);
//....
//this->setWindowTitle(windowTitle); // ??? //<<<<<<<<<<<<<<<<<<<<<< Move it, after setupUi();
ledGreen.load(":/bitmap/LED-Green-20.bmp");
ledRed.load(":/bitmap/LED-Red-20.bmp");
ledDark.load(":/bitmap/LED-Dark-20.bmp");
ui.setupUi(this);
this->setWindowTitle(windowTitle); //<<<<<<<<<<<<<<<<<<<<<<Here
//....
}