Tell me, how can you implement such a "custom" component (similar to timeline music editors)? You need to get a graded "container" with lines where you can add objects. Added objects can be moved with the mouse only along the line where the object was added. What is an "object"? Suppose QButton is not important in principle .. any widget. The result should be something like this 
or something like that
