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?

user967400
  • 53
  • 5

2 Answers2

0

The likeliest cause of the app becoming unresponsive is something that stalling the execution on the main thread. With running the project from/ or attaching to Visual Studio debugger (better debugger than the one used by Qt Creator) try to get your app in such unresponsive state. Now look at Main Thread in Threads view (select one), also look at Call Stack view. Where does the execution stall?

The log in Output View is also helping to recreate the context of how to get there. You can see Qt and your own debug output there.

Alexander V
  • 8,351
  • 4
  • 38
  • 47
0

While debugging I found that the App was not syncing because of missing WA_Mapped attribute. My problem was just opposite of the below issue. When I used to maximize after minimize, the App used to become responsive. Finally setting the attribute WA_Mapped at different places (trial n error) fixed the issue.

widgets freezing after minimise window

Thanks for @AlexanderVX response.

Community
  • 1
  • 1
user967400
  • 53
  • 5