You are creating a layout for WaveDraw but forget to add the two frames that contain the buttons.

You are also lucky that QThread::msleep() is a static method, because WaveDraw::thread() returns the thread that owns the WaveDraw object, which is the main thread.

You do not have any synchronization on access to the data shared between the two threads.

Cheers.
_