Keeping GUIs responsive during long-running tasks

前端 未结 9 2090
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-14 22:28

Keeping the GUI responsive while the application does some CPU-heavy processing is one of the challenges of effective GUI programming.

Here\'s a good discussion of h

相关标签:
9条回答
  • 2020-12-14 23:22

    I use threads so the GUI's main event loop never blocks.

    0 讨论(0)
  • 2020-12-14 23:25

    I think delayedresult is what you are looking for:

    http://www.wxpython.org/docs/api/wx.lib.delayedresult-module.html

    See the wxpython demo for an example.

    0 讨论(0)
  • 2020-12-14 23:27

    Working with Qt/C++ for Win32.

    We divide the major work units into different processes. The GUI runs as a separate process and is able to command/receive data from the "worker" processes as needed. Works nicely in todays multi-core world.

    0 讨论(0)
提交回复
热议问题