Getting syntax error in tutorial
-
[quote author="mzimmers" date="1295229420"]OK, but...what about when creating a brand-new project? The tutorial shows a dialog box for selecting tagets that I can't find. I'm sure it's right under my nose, but...I can't figure out how to get to it.[/quote]
You do not find what - the dialog box or the targets within the dialog box?
-
[quote author="Tobias Hunger" date="1295258618"]SIGNAL and SLOT are supposed to contain a signature of a method, so it must contain "int", not 0. Your changed code will not work: At runtime it will fail to connect the signal to the slot.[/quote]
Oh, I realize that. The purpose of that exercise was to see whether I could eliminate the eclipse editor's "syntax error" message that I got. For whatever reason, the editor doesn't like the "int." No big deal, as the program builds and runs fine, but...I was hoping to get to the bottom of the error.
-
SIGNAL() and SLOT() are actually macros that do some magic to convert the method signature into a const char array, that is actually fed to the connect method. Seems that eclipse does not recognize this fact and treats it as regular C/C++ syntax and bails out.