David Okwii
David Okwii

Reputation: 7840

how can i connect a signal in one Qwidget to a slot in another Qwidget?

am new to Qt and Qtcreator. Am working on a multi-widget application. My question is, is it possible to connect a signal in one Qwidget (say a submit button in edit contacts Qwidget) to a slot in another Qwidget(one showing the edited contacts) using the graphical signal-slot editor in Qtcreator.

From my interaction with the signal-slot editor, i can only drag the signal to another component withing the same widget, but not one outside of the widget. Thanks

Upvotes: 1

Views: 4310

Answers (1)

atamanroman
atamanroman

Reputation: 11818

AFAIK that's only possible for widgets in the same .ui file. You will need to do this in the generated code with connect(widgetA, SIGNAL(signal()), widgetB, SLOT(slot());

Upvotes: 3

Related Questions