开发者

Qt show() function after hide(), worked when the window inactive but not active

I have made a simple qt program that grabs a picture and display it using QPainter/QPaintEvent widget. I make it on QPainter so that I can put a X mark on the picture from a user input. I have made the program window to hide and show based on an ex开发者_如何学Pythonternal button input. It works well if I set the running program window inactive. But if I set the window to active and triggered the show/hide function, it crashes with error:

Fatal IO error: client killed

Also, when I tried to use show() function after hide(), it gives 2-3 of a same error (applies when the window either active and inactive):

QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread

Is this a bug in qt? Any suggestion on workaround this problem?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜