Monday, February 22, 2010

QT - things to know

As I have started working with QT, there are a few things you need to know and be careful about

1) When you have to connect a signal to a slot , you need to have a Q_OBJECT declaration in that particular class, whose object is sending the signal.
2) When connecting a signal to a slot, both the signal and the slot should take the same parameters, for example, if a signal is passing an int, the slot should also accept an int.
3) Most importantly it is better to declare your QT classes in a separate file and have cpp and .h files


No comments:

Post a Comment