Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Trying to compile my first widget [solved]
Forum Updated to NodeBB v4.3 + New Features

Trying to compile my first widget [solved]

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 1.3k Views 1 Watching
  • 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 Offline
    G Offline
    gabriel_h
    wrote on 26 Apr 2014, 09:16 last edited by
    #1

    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
    0
    • E Offline
      E Offline
      Eddy
      wrote on 26 Apr 2014, 10:47 last edited by
      #2

      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
      0
      • G Offline
        G Offline
        gabriel_h
        wrote on 26 Apr 2014, 13:14 last edited by
        #3

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

        1 Reply Last reply
        0
        • E Offline
          E Offline
          Eddy
          wrote on 26 Apr 2014, 13:42 last edited by
          #4

          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
          0

          1/4

          26 Apr 2014, 09:16

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved