I want a widget that can have various number of input & output pins, and each instance of this widget acts as a module which can connect to another module via these pins. Eventually, this will give me a work flow with many connected blocks. Ideally, the connection can be done via mouse operations such as drag and drop from one pin to another. And I also need to add texts or even draw some shapes onto the blocks.
I know that I can write this from scratch but what's the best base widget to start with?
I would go with QGraphicsItem. It supports features like drag & drop, collision detection, etc.. Those should be useful for your use-case. Make sure to check other classes that inherits this one (look for
Also, make sure to check out this article.