Visualize QT Signals and Slots
Asked Answered
A

3

9

I'm currently working with a lot of custom widgets which provide different signals and slots for communicating with each other.

E.g. there is one widget which establishes a network connection and then emits a signal to the others which then change their state from disabled to enabled.

I now want to visualize how these widgets work together and wanted to ask what would be the best way? Is there an UML diagram type which would fit for this purpose?

Perhaps there are already tools which could automatically search for connections and display them?

Would be nice if it would be possible to display not used slots/signals too.

EDIT: Would be nice if there would be an approach which could not just display QWidgets but also classes of QObject which have also Signal/Slots

Arvid answered 28/11, 2010 at 11:14 Comment(0)
W
1

I know the question is dated but maybe it will help someone.

KDAB created a tool to visualize signals and slots and to do a lot of other debugging on Qt applications. You can get it here: https://www.kdab.com/development-resources/qt-tools/gammaray/

Weathers answered 8/11, 2018 at 13:36 Comment(1)
It is a very nice tool, but is aimed at dynamic analysis. And gammaray signal module shows existing connections, not from which members signals are emitted from. The poster asked for static analysis and drawings of signal/slot graphs.Charwoman
S
7

Maybe this can help http://hackatool.blogspot.co.at/2013/05/simple-tool-to-visualize-connections.html It is a very simple program which uses DOT to visualize the connections but it is quite limited though.

Sales answered 27/5, 2013 at 21:44 Comment(0)
W
1

I know the question is dated but maybe it will help someone.

KDAB created a tool to visualize signals and slots and to do a lot of other debugging on Qt applications. You can get it here: https://www.kdab.com/development-resources/qt-tools/gammaray/

Weathers answered 8/11, 2018 at 13:36 Comment(1)
It is a very nice tool, but is aimed at dynamic analysis. And gammaray signal module shows existing connections, not from which members signals are emitted from. The poster asked for static analysis and drawings of signal/slot graphs.Charwoman
F
0

The designer, in signal/slot edit mode, does exactly that.

Footlights answered 28/11, 2010 at 11:17 Comment(1)
I'm inheriting from ui-files created with QtDesigner and add signals/slots to the resulting classes. QtDesigner is just able to show sig/slots for .ui-Files. Another problem is that there also could be QObjects which have Signals/Slots. These types do not have a .ui at all.Arvid

© 2022 - 2024 — McMap. All rights reserved.