I started my first steps programming in Qt and can t find an answer. I have some widget, let s say it s named "tab". I want to add to it s layout new widget. I can do it by writing:
QLabel *label = new QLabel(tab);
我想做同样的事情, 但与其说“ tab ”, 不如说“ tab ”, 我想使用存储在 QString 变量中的部件名称。 类似的东西( 但是它不起作用, 可以将 QString 转换为 QWidget ) :
QString name = "tab";
QLabel *label = new label(zakladka);
有可能吗?