Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] The program has unexpectedly finished (code -1073741819)
Greetings to all
I am newcomer to this forum and I'm starting to learn Qt. I'm using the book "C + + GUI Programming with Qt 4 'as a text guide ... excellent book.
Although I have not had trouble understanding what I've read so far, just yesterday I had a problem whose causes do not understand. I'm testing the spreadsheet application that described aparce between chapters 3 and 4, complete missing sections of code and built the application. However, although there is no problem during the construction process (the final executable is created), when you start to run, nothing happens.
When I build the application from the console with qmake, specifically do the following:
After building the executable simply try to run but nothing happens. Sometimes a window operating system stating that the application stopped working.
On the other hand, when I build the application from the IDE QtCreator aprace me this message:
The program has unexpectedly finished.
C:\Users\PROYECTO\Desktop\mainwindow\debug\mainwindow.exe exited with code -1073741819
I really do not understand what happens ... esenciamente code is the one in the book.
I would appreciate any help greatly to identify and / or resolve this problem.
I have not put here the code of the program because there are several files, but if necessary or required someone will put it gladly.
I apologize in advance if this question is not appropriate for this section of the forum (not sure where to publish my question). If anyone can tell me where it would be more appropriate to do it, I would appreciate.
raaghuu last edited by
I have used that book too and the program worked fine for me.... You must have done something wrong when you were typing it in... you should try to re-write it, this time in parts, as it is described in the book, instead of doing it all at once... that may help you to pin-point where you went wrong... (Also this way you can play with the code and discover new interesting things you can do within it if you use the documentation properly)
Thanks for the advice
I tested each of the examples aperecen in Chapters 1 and 2 of the book and worked well. Some of these applications are part of the spreadsheet (as 'findDialog' and 'goToCell'), and all worked perfectly on the individual.
What I mean is that I built the application piece by piece as it appears in the book and how you advise me. Copy and paste to make sure every segment of code directly from the book. In addition, the code you need to add (which I did on my own) is not much really ... only a few missing segments in the functions that create actions and menus.
However, I may be found missed something.
Thanks anyway for your time and your help
By the way, if you do not need to say that all the project files (headers, source, resource files and archives. Ui) are in a folder called 'mainwindow'. The images are in the 'images' which is also inside the folder 'mainwindow'.
Do not know if this influence in some way.
Recently resume work with Qt and learned (just a little) to use the debugger. I managed to find the problem (a variable 'QAction' uninitialized), fix it and now my application works perfectly.
I wonder how I can close the discucion and / or label it as 'solved'.
Thanks for all your help
scroverty last edited by
Just Edit your first post, It'll let you edit the thread's title.