我有多个 ui 文件。 我想根据按钮点击来浏览它们。
我如何在代码中控制它? 我该怎么做?
最佳答案
每个 ui 文件通常都有与之关联的 cpp 类。
只需创建并显示即可。
class myGuiClass: public QWidget{...}; // class assotiated with ui
void SomeOtherClass::onSomePushButtonClicked()
{
myGuiClass* wnd= new myGuiClass(this);
wnd->show();
}
关于c++ - Qt 移动应用程序的多个 UI 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6895333/