Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Trying to compile my first widget [solved]

    Installation and Deployment
    2
    4
    1046
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gabriel_h 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

      1 Reply Last reply Reply Quote 0
      • E
        Eddy 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.

        Qt Certified Specialist
        www.edalsolutions.be

        1 Reply Last reply Reply Quote 0
        • G
          gabriel_h last edited by

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

          1 Reply Last reply Reply Quote 0
          • E
            Eddy 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

            Qt Certified Specialist
            www.edalsolutions.be

            1 Reply Last reply Reply Quote 0
            • First post
              Last post