qt-light/examples/custom-widgets/main.cpp
Jaidyn Ann 1704d392e8 Add “custom-widgets” example
This small example demonstrates defining and
binding to your own subclass of a QT widget.
2024-02-04 15:10:37 -06:00

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();
}