Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个QStackedWidget包含 2 层小部件(另一个小部件内的小部件)。最后的小部件包含多个按钮。QStackedWidget当我按下其中一个按钮时,如何更改它的索引?
QStackedWidget
如果我有你的问题,aswer 很简单——你试过了吗:
ui->stackedWidget->setCurrentIndex(INDEX);