PDA

View Full Version : QT creator / designer connects slots & signals, but where's the code?



Petruza
9th August 2009, 21:54
Hi, I'm a beginner to QT, I'm using QT creator, and QT designer for the GUI.
( QT designer is the visual tool to design the GUI that pops out when editing a .ui file in QT creator, right? )

This creates a method that gets triggered when the signal occurs, (this is called a slot, right? ) but I don't see anywhere in the code the connect statement to connect the slot and the signal.
Where is it? is it being created in some hidden base classes of the MainWindow class or something? ( I'm using the wizard and deriving from QMainWindows )

Just for curiosity.
Thanks!

axeljaeger
26th August 2009, 11:35
If the methodes generated follow the pattern on_<objectname>_<signalname> then the code is in QMetaObject::connectSlotsByName

lanmanck
28th August 2009, 07:12
creator,especially in embedded world, it's very useful!!