Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 |
emit signalname(); // no parameters emit signalname(parametervalue); // with one parameter |

|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
class.h
----------
#include <qobject.h>
class Class : public QObject
{
Q_OBJECT
public:
Class();
~Class();
signals:
void dosomething();
};
class.cpp
-------------
#include "class.h"
Class::Class() : QObject()
{}
Class::~Class()
{}
.........
example:
class = new Class;
connect(class, SIGNAL(dosomething()), this, SLOT(slotDoSomething()));
|
This post has been edited 1 times, last edit by "Krasu" (Apr 18th 2005, 5:31pm)