Skip to content

Instantly share code, notes, and snippets.

@turugina
Created May 20, 2011 08:49
Show Gist options
  • Save turugina/982582 to your computer and use it in GitHub Desktop.
Save turugina/982582 to your computer and use it in GitHub Desktop.
class Hoge
{ Q_OBJECT;
public:
Hoge();
private slot:
void OnButtonClicked(bool);
private:
QPushButton *button_
};
Hoge::Hoge() : button_(new QPushButton("Push Me!"))
{
connect(button_, SIGNAL(clicked(bool)), this, SLOT(OnButtonClicked()));
button_->show();
}
void Hoge::OnButtonClicked()
{
QMessageBox::information("Button Clicked!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment