First program:
The fundamental problem from a Qt viewpoint is that your code never reaches the Qt event loop, i.e. the a.exec() call, and therefore Qt is not functioning. QWidget::show() schedules the widget to be displayed when the event loop is functioning: it does not show it immediately.
Aside from that, you code leaks memory, line 6, such that it would probably not run for long before crashing out of memory or at least thrashing the machine's virtual memory.
Second program:
You create a named window "result" to display the frames, and then cvShowImage targeting a window called "Left".
Bookmarks