class myCustomWidget1
: public QWidget{
Q_OBJECT
public:
myCustomWidget1
(QObject * parent
= 0);
~myCustomWidget1();
signal:
drawMyPicture(int x, int y, const QPicture& pict);
};
class myCustomWidget2
: public QWidget{
Q_OBJECT
public:
myCustomWidget2
(QObject * parent
= 0);
~myCustomWidget2();
public slots:
void drawSomething(int x, int y, const QPicture& pict);
};
// Somewhere in your code
...
myCustomWidget1* widget1 = new myCustomWidget1(this);
myCustomWidget2* widget2 = new myCustomWidget2(this);
connect(widget1, SIGNAL(drawMyPicture(int, int, const QPicture&)),
widget2, SLOT(drawSomething(int, int, const QPicture&)));
class myCustomWidget1: public QWidget
{
Q_OBJECT
public:
myCustomWidget1(QObject * parent = 0);
~myCustomWidget1();
signal:
drawMyPicture(int x, int y, const QPicture& pict);
};
class myCustomWidget2: public QWidget
{
Q_OBJECT
public:
myCustomWidget2(QObject * parent = 0);
~myCustomWidget2();
public slots:
void drawSomething(int x, int y, const QPicture& pict);
};
// Somewhere in your code
...
myCustomWidget1* widget1 = new myCustomWidget1(this);
myCustomWidget2* widget2 = new myCustomWidget2(this);
connect(widget1, SIGNAL(drawMyPicture(int, int, const QPicture&)),
widget2, SLOT(drawSomething(int, int, const QPicture&)));
To copy to clipboard, switch view to plain text mode
Bookmarks