#include <QtGui>
class Base
{
public:
int i;
};
{
Q_OBJECT
public:
int i;
};
int main(int argc, char* argv[])
{
MyButton b;
b.setText("Click to close!");
QObject::connect(&b,
SIGNAL(clicked
()),
&app,
SLOT(quit
()));
b.show();
return app.exec();
}
#include "main.moc"
#include <QtGui>
class Base
{
public:
int i;
};
class MyButton : public QPushButton, public Base
{
Q_OBJECT
public:
int i;
};
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
MyButton b;
b.setText("Click to close!");
QObject::connect(&b, SIGNAL(clicked()), &app, SLOT(quit()));
b.show();
return app.exec();
}
#include "main.moc"
To copy to clipboard, switch view to plain text mode
works fine for me. Your error must be somewhere else.
Bookmarks