Quote Originally Posted by harleyskater View Post
why can I put 6 posts in 1 thread with all my code asking why a button isn't firing and still have not gotten any real advice?
That's very simple to answer - because you didn't provide proper information in your first post. Each reply to each of your posts in this thread provides a proper answer to the problem stated in the previous post. First you asked why the application crashes and you were given the answer that it is because you had been using an uninitialized variable which was the proper answer to your question as your variables were obviously uninitialized. Of course after a year of C++ programming you should have noticed that yourself but ok... Then you stated you thought you had them initialized and posted a ui file (which you should have attached to your post instead of posting it inline with wrong bbcode, by the way) which was not that much relevant as the unitialized variable was the one in your widget class and not in the form. Fatjuicymole pointed out you had two sets of variables with the same names which again was the proper answer to your statement. Then you asked where you should put the connect statement connecting your uninitialized variable to something else. You were then given a good advice to use the variable from your ui class instead of the uninitialized variable. Then you said you had tried that before and it gave you some errors that you posted. The answer (again the right one) was that you placed it in a wrong place. Of course after programming in C++ for a year you should have noticed you didn't have a "ui" variable in this scope or you should have understood the clear message from the compiler you had been using for a year, but who am I to judge...

So to summarize, you had the following problem history:
1. you used an unexisting "ui" variable in a connect statement which gave you errors you didn't understand
2. you removed the offending line and instead made another mistake of declaring a variable of the same name in your widget class, forgetting to initialize it and using it in a connect statement
3. you were told you should have used the variable from the ui file which led you back to your original problem (or rather misled you as you just needed to add "ui->" to your statement and you simply misinterpreted it)
4. you told me you have little experience with C++ because you have been using it for only a year but you are used to .Net (meaning probably C#, which is also object oriented so you should have spotted both your problems as in C# they would be exactly the same) causing another headache and wondering why majority of problems on this forum recently is related to C++ and not Qt and thinking whether we should introduce some kind of "basic C++ knowledge" certification process for people registering on this forum.

I hope I clarified the situation. If not, let me know what is still unclear and we'll try to provide a better explanation.