I have two QWidgets inside a QHBoxLayout. I want to be able to change the width of the left QWidget by clicking on its right side and moving mouse (such as the Qt Editor's projects browser).
You can do exactly what you want by using QSplitter. You can find a complete example here: https://stackoverflow.com/a/38433287/4297146