PSYCOR
4th September 2016, 17:29
Hello :)
any one can help to find the error
i want when i click in the button the text changed
#include <QApplication>
#include <QPushButton>
void handleButton(QPushButton *m_bouton)
{
// change the text
m_bouton->setText("Example");
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton *m_bouton=new QPushButton("Salut les Zéros, la forme ?");
m_bouton->show();
QObject::connect(m_bouton, SIGNAL (clicked()), m_bouton, SLOT (handleButton(m_bouton)));
return app.exec();
}
any one can help to find the error
i want when i click in the button the text changed
#include <QApplication>
#include <QPushButton>
void handleButton(QPushButton *m_bouton)
{
// change the text
m_bouton->setText("Example");
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton *m_bouton=new QPushButton("Salut les Zéros, la forme ?");
m_bouton->show();
QObject::connect(m_bouton, SIGNAL (clicked()), m_bouton, SLOT (handleButton(m_bouton)));
return app.exec();
}