Thanks for the help people.
I'm still not there.
In it's simplest form I try to make a subclass following Blubbz0r's advice:
header:
//--------------------------------------
{
Q_OBJECT
public:
};
cpp:
/*------------------------------------------------------------------------------------*/
{
this->setText(text);
}
header:
//--------------------------------------
class Button : public QPushButton
{
Q_OBJECT
public:
Button::Button(const QString & text, QWidget * parent = 0 );
};
cpp:
/*------------------------------------------------------------------------------------*/
Button::Button(const QString & text, QWidget * parent) : QPushButton(text, parent)
{
this->setText(text);
}
To copy to clipboard, switch view to plain text mode
But I get an error, extra qualification on member Button.
I didn't even bother about the part about accepting char[] yet.
Could someone please just write out this little piece of code correctly for me, I learn best by by staring at correct syntax.
Thanks.
Bookmarks