PDA

View Full Version : this code is correct, but It will not run ?



rezas1000
3rd September 2014, 12:47
Hello,this code is correct, but it do not run. why?

#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();
}

the error is:
cannot open output file debug\untitled121.exe: Permission denied
collect2.exe: error: ld returned 1 exit status

wysota
3rd September 2014, 12:52
Close the running application before building it again.