Jaidyn Ann
1704d392e8
This small example demonstrates defining and binding to your own subclass of a QT widget.
30 lines
335 B
C++
30 lines
335 B
C++
#include "goodbye-widgets.h"
|
|
|
|
#define gbbutton OurButton *
|
|
|
|
OurButton::OurButton(QWidget* parent)
|
|
: QPushButton(parent)
|
|
{
|
|
}
|
|
|
|
|
|
void
|
|
OurButton::SayGoodbye()
|
|
{
|
|
setText("Goodbye");
|
|
}
|
|
|
|
|
|
#define cwbutton OurButton *
|
|
|
|
extern "C" {
|
|
#include "prototypes.h"
|
|
}
|
|
|
|
|
|
void
|
|
gb_saygoodbye(cwbutton button)
|
|
{
|
|
button->SayGoodbye();
|
|
}
|