Results 1 to 2 of 2

Thread: this code is correct, but It will not run ?

  1. #1
    Join Date
    Jul 2014
    Posts
    95
    Thanks
    67

    Default this code is correct, but It will not run ?

    Hello,this code is correct, but it do not run. why?
    Qt Code:
    1. #include <QtWidgets>
    2. #include <QtGui>
    3. int main(int argc, char* argv[])
    4. {
    5. QApplication app(argc, argv);
    6. QDialog dlg;
    7. QPushButton *btn = new QPushButton(QObject::tr("Expand/Collapse"),
    8. &dlg);
    9. btn->setCheckable(true);
    10. QVBoxLayout *lay = new QVBoxLayout(&dlg);
    11. lay->addWidget(btn);
    12. QLabel *ext = new QLabel(QObject::tr("Extension"));
    13. dlg.setExtension(ext);
    14. QObject::connect(btn, SIGNAL(toggled(bool)),
    15. &dlg, SLOT(showExtension(bool)));
    16. dlg.exec();
    17. return app.exec();
    18. }
    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
    Last edited by rezas1000; 3rd September 2014 at 12:44. Reason: Changing the title

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: this cod is correct, but it do not run?

    Close the running application before building it again.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    rezas1000 (3rd September 2014)

Similar Threads

  1. Correct usage of setWindowFlags()?
    By 33333 in forum Newbie
    Replies: 1
    Last Post: 2nd July 2012, 07:08
  2. 100% correct usage of QSharedData
    By coder2012 in forum Qt Programming
    Replies: 4
    Last Post: 21st May 2012, 01:14
  3. Is this sentence correct?
    By SWEngineer in forum Newbie
    Replies: 6
    Last Post: 21st June 2011, 01:56
  4. QSetting value() not correct
    By bpetty in forum Newbie
    Replies: 1
    Last Post: 14th August 2006, 19:58
  5. What's the correct way of clearing a pixmap?
    By karye in forum Qt Programming
    Replies: 4
    Last Post: 19th January 2006, 17:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.