Trying to compile my first widget [solved]
-
wrote on 26 Apr 2014, 09:16 last edited by
Hello all,
I'm trying to compile the first exercice in the book "C++ GUI programming with QT 4" (page 14 and further). For those of you who also tried to copy the code of the manual and compile this, I hope to get help with the following (tons of) errors:
allocation of incomplete type 'QLabel'
allocation of incomplete type 'QEdit'
allocation of incomplete type 'QCheckBox'
...
no matching member function call to 'connect'
...
unknown type name 'QHBoxLayout'I'm using QT5 on a Mac...
What's the problem here? I've copied the portions of code literally from the book and it gives these errors...
All help very much appreciated!
Gabriel -
wrote on 26 Apr 2014, 10:47 last edited by
hi and welcome to the Qt forums,
did you include the headers?
#include <QLabel>
I don't think they put them everywhere in the sample code.
-
wrote on 26 Apr 2014, 13:14 last edited by
Thanks Eddy! Works like a charm :) !
All the best,
Gabriel -
wrote on 26 Apr 2014, 13:42 last edited by
Glad you can go further now in the Qt world ;-)
Please edit the title of your first post and prepend [solved] to it
1/4