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.
我有两个窗户。单击窗体 A 的按钮后,我需要打开窗体 B 并通过 B 的表小部件中的 http 请求加载一些数据。我想知道我需要实现哪个插槽才能完成它?
connect(formA->button, SIGNAL(clicked()), formB, SLOT(showAndInitialize()));
对于表单 B,您需要实现自己的插槽void showAndInitialize(),您可以在其中调用this->show()和发起 http 请求。
void showAndInitialize()
this->show()