0

I have a very strange problem. The application is based on Qt C++. There is a TabWidget whose tabs are created dynamically. The tab contains QtMainWindow in ActiveX widget. When multiple apps are started, the selected one works fine. But when another tab is selected, it becomes unresponsive. When I minimize the Application and then maximize again then the tab starts working fine. I tried with setFocus, activateWindow, showNormal and setActiveWindow but nothing is working.

Can somebody help me in this issue?

4

2 回答 2

0

在调试时,我发现应用程序由于缺少 WA_Mapped 属性而没有同步。我的问题与以下问题正好相反。当我在最小化之后最大化时,应用程序曾经变得响应。最后在不同的地方设置属性 WA_Mapped(试验 n 错误)解决了这个问题。

最小化窗口后冻结的小部件

感谢@AlexanderVX 的回复。

于 2015-09-17T09:20:29.847 回答
0

应用程序变得无响应的最可能原因是在主线程上停止执行。通过从/或附加到 Visual Studio 调试器(比 Qt Creator 使用的调试器更好的调试器)运行项目,尝试让您的应用程序处于这种无响应状态。现在查看线程视图中的主线程(选择一个),同时查看调用堆栈视图。执行在哪里停止?

输出视图中的日志也有助于重新创建如何到达那里的上下文。您可以在那里看到 Qt 和您自己的调试输出。

于 2015-09-11T17:01:58.640 回答