Answer the question
In order to leave comments, you need to log in
Why doesn't the title of the Qt window change?
In general, I want to make the window title change by pressing ctrl + space.
Here is the code:
int main(int argc, char **argv){
QApplication app(argc, argv);
QWidget wgt;
QAction *act = new QAction("Действие!",0);
act->setShortcut(QKeySequence("CTRL+ "));
wgt.addAction(act);
wgt.show();
wgt.resize(300,300);
QObject::connect(act, SIGNAL(triggered()), &wgt, SLOT(setWindowTitle("sasdfasdf")));
return app.exec();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question