Create a custom class that Will handle everything.
For example, i have a panel.h class that inherits from QFrame, in this class i have a Lot of factory functions for creating every widget, and all those returning widgets Will be anchored to a base Layout that belongs to the panel..
Once You create this Workflow, handcoding Will be a lot faster