Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 71

Thread: Application crashes at launch-time

  1. #41
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    Yes, I tried it, application compiled with no errors, and no errors at launching.

  2. #42
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    Amm... yes, I expected as much, but the point was to see if you ar getting the debug message...

    EDIT:
    you should start the application from the console
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #43
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    Debug message? What do you mean? I tried to type make all instead of make, and reached message that it cannot find file somename.dll. And if it's not the answer you were expecting, how can I reach debugg message?

  4. #44
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    Am... look at the code I gave you.
    there is a line:
    Qt Code:
    1. qDebug()<<"Dialog::settingUp()";
    To copy to clipboard, switch view to plain text mode 

    This will print 'Dialog::settingUp()' in the console if you run the application in the console, and if the slot will get executed.
    If the slot will not get executed, the message will not be printed.
    This will tell you if the problem is IN the slot, or that the problem is that the slot is not being called.

    Just start the program in the console, and see what ouput you get.

    No need for 'make all' or any other thing.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #45
    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: Application crashes at launch-time

    He's using Windows, so adding CONFIG+=console and rerunning qmake is advised.

  6. #46
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    I added this, rebuild application, console window opened (and also normal windows application with GUI opened) but the console was clear. What does it mean?

  7. #47
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    it means the slot is not being called.
    But at the moment I don't have the time to review you code again...
    So check every thing that has to do with the signal/slot connection.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  8. #48
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    Ok, I'll review it to find what's wrong. But even if the slot is not called, some widgets should be hidden even if there's no connection. Connection look:
    Qt Code:
    1. connect(ui.nextStepButton, SIGNAL(clicked()), this, SLOT(settingUp()));
    To copy to clipboard, switch view to plain text mode 

  9. #49
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    So what's wrong?

  10. #50
    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: Application crashes at launch-time

    You tell us Did you come up with anything while reviewing your code? Because as for now you're the only one who saw it...

  11. #51
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    post ALL your code.
    The one file yo posted looks ok.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  12. #52
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    Quote Originally Posted by high_flyer View Post
    post ALL your code.
    Sure. Unfortunately my files are too big to attach them, I'll post it in rar file
    http://download.yousendit.com/049347421EAD445D

  13. #53
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    you should really read and try SIMPLE examples untill you get how the ui aproach works in Qt.
    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QApplication app(argc, argv);
    4. QApplication::setStyle ( new QPlastiqueStyle() );
    5. QDialog *window = new QDialog;
    6. //Ui::Dialog ui;
    7. //ui.setupUi(window);
    8. app.setMainWindow(window);
    9. window->show();
    10. return app.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  14. #54
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    Do you know how to use signals and slots?
    Your kidding me? Of course, I know.
    I am starting to think you are kidding me...

    Qt Code:
    1. class Dialog : public QDialog/*, public Ui::Dialog*/ //what was that for??
    2. {
    3. Q_OBJECT
    4.  
    5. public:
    6. Dialog(QWidget *parent = 0);
    7.  
    8.  
    9. public slots: //<<----this is needed
    10. bool settingUp();
    11. void previousStep();
    12.  
    13. private:
    14.  
    15. Ui::Dialog ui;
    16. };
    To copy to clipboard, switch view to plain text mode 
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  15. #55
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    I think public Ui:ialog is needed to access gui elements

  16. #56
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    as I said, READ about it more.
    You have a private ui elements which you use in your Dialog class.
    If you use that approach you don't need to sublcass, one of the nice things about Qt4 ui way.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  17. #57
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    Right. But there is an error in line
    Qt Code:
    1. app.setMainWindow(window);
    To copy to clipboard, switch view to plain text mode 
    class QApplication has no member named setMainWindow

  18. #58
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    that is correct.
    What do you do then?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  19. #59
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application crashes at launch-time

    I don't know

  20. #60
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Application crashes at launch-time

    Read the docs maybe??
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 5
    Last Post: 27th May 2006, 14:44

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.