Hello,this code is correct, but it do not run. why?
#include <QtWidgets>
#include <QtGui>
int main(int argc, char* argv[])
{
&dlg);
btn->setCheckable(true);
lay->addWidget(btn);
dlg.setExtension(ext);
QObject::connect(btn,
SIGNAL(toggled
(bool)),
&dlg, SLOT(showExtension(bool)));
dlg.exec();
return app.exec();
}
#include <QtWidgets>
#include <QtGui>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QDialog dlg;
QPushButton *btn = new QPushButton(QObject::tr("Expand/Collapse"),
&dlg);
btn->setCheckable(true);
QVBoxLayout *lay = new QVBoxLayout(&dlg);
lay->addWidget(btn);
QLabel *ext = new QLabel(QObject::tr("Extension"));
dlg.setExtension(ext);
QObject::connect(btn, SIGNAL(toggled(bool)),
&dlg, SLOT(showExtension(bool)));
dlg.exec();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
the error is:
cannot open output file debug\untitled121.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
Bookmarks