Results 1 to 5 of 5

Thread: Compiler error when calling QObject::connect. What am I missing?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2008
    Posts
    142
    Thanks
    3
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Compiler error when calling QObject::connect. What am I missing?

    Did you include the header for QScrollBar in your class?

  2. #2
    Join Date
    Feb 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiler error when calling QObject::connect. What am I missing?

    Quote Originally Posted by rexi View Post
    Did you include the header for QScrollBar in your class?
    That seemed to be the reason. Thanks

    A little strange the compiler didn't complain about unresolved type or sth like that.

  3. #3
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiler error when calling QObject::connect. What am I missing?

    It doesn't have to, because you're passing a pointer to it, which at that point is a resolved type. At that point it just doesn't know the QScrollBar is a QObject.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. Issue using connect, what am I missing?
    By technoViking in forum Qt Programming
    Replies: 1
    Last Post: 11th January 2010, 05:11
  2. [Help] QObject::connect
    By vinny gracindo in forum Newbie
    Replies: 3
    Last Post: 20th October 2009, 13:26
  3. QObject::connect stalls
    By arkain in forum Qt Programming
    Replies: 2
    Last Post: 26th April 2009, 00:26
  4. Replies: 4
    Last Post: 10th November 2006, 15:38
  5. QStringList in QObject::connect
    By DPinLV in forum Qt Programming
    Replies: 6
    Last Post: 6th September 2006, 17:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.