Results 1 to 3 of 3

Thread: problem with signal/slot

  1. #1
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default problem with signal/slot

    All I want is to connect a slot to a signal, but I keep getting an error:

    zoomView.cpp:13: error: no matching function for call to `ZoomView::connect(QScrollBar*, const char[19], ZoomView* const, const char[14])'

    Here is the code:
    Qt Code:
    1. ZoomView::ZoomView(QGraphicsScene *scene, QGraphicsSimpleTextItem *txt) : QGraphicsView(scene){
    2. connect(verticalScrollBar(), SIGNAL(valueChanged(int)),
    3. this, SLOT(scrollV(int)));
    4. ...
    To copy to clipboard, switch view to plain text mode 

    Anyone know what it might be?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: problem with signal/slot

    Perhaps a missing #include <QScrollBar>?
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    ihoss (24th August 2007)

  4. #3
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default Re: problem with signal/slot

    Godd thing I posted in the n00b forum

Similar Threads

  1. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08
  2. [QMYSQL] connection problem
    By chaos_theory in forum Installation and Deployment
    Replies: 5
    Last Post: 2nd July 2007, 09:52
  3. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  4. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.