当前位置: 动力学知识库 > 问答 > 编程问答 >

user interface - Best Qt Widget to use for flow controls

问题描述:

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 Inherited By:).

Also, make sure to check out this article.

分享给朋友:
您可能感兴趣的文章:
随机阅读: