⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Trying to compile my first widget [solved]

  • 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!

  • 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.

  • Thanks Eddy! Works like a charm :) !
    All the best,

  • Glad you can go further now in the Qt world ;-)

    Please edit the title of your first post and prepend [solved] to it

Log in to reply