You need to remember your C++ basics. To call a non-member function, eg. one in the global namespace, you use the global scope qualifier:Do you know how can I call it without any error?
You need to remember your C++ basics. To call a non-member function, eg. one in the global namespace, you use the global scope qualifier:Do you know how can I call it without any error?
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Thank you very much! Not all windows closed when signal was sent, but I wrote this part inside signalHandler() function before showing the QMessageBox:
Qt Code:
widget->hide(); }To copy to clipboard, switch view to plain text mode
Now it is working very well. Thank you again!
Great! Now start practicing defensive programming and debug your programs before you release them so you will never have a need for this kind of message.
If you want to make this kind of signal handler really useful instead of just displaying a message like "Oops, something broke and there is nothing you can do to fix it", you would implement something in your QApplication class that could save any open files and basically try to do whatever is possible to clean up what the user was doing and leave it in a recoverable state.
Just displaying a message and then crashing out isn't much different from simply crashing out as far as the user is concerned if their work is trashed and they lose it all.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Hello,
I can't find correct solution still.
Thanks & Regards
Cyberops Infosec LLP
Cyberops For : Cyber Security Training in Jaipur, VAPT, Penetration Testing & Winter Training in Jaipur.
What is your question? If you are trying to implement something in the same way as INeedADollar is doing, then there is more than enough information in the code and advice that has been posted in response to his questions for you to do the same thing.I can't find correct solution still.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks