0

In my Qt application, I have the following code under a public slot:

   NewForm* newform = new NewForm(ui->frame_2);
   newform->show();

And it takes about 8 seconds for the form to open after the click() signal is emitted. All I have on the form is some labels, two lineedits, a flat button, and one textedit on the new form. The form relies on some networking backing code... but that shouldn't be relevant to the UI, should it? It calls no additional code on initialization... I'm really stuck. Any ideas how I might fix this? Thanks in advance.

4

1 回答 1

0

通过将表单作为在主表单的构造函数中初始化的全局变量来修复它。显然 Qt 需要永远构建表单小部件。无论如何,谢谢你们!

于 2014-05-01T17:48:00.473 回答