Results 1 to 2 of 2

Thread: connect

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default connect

    Hi, I'd like break a connect (make from designer and re-connect). I try this:
    MainForm* w;
    Qt Code:
    1. disconnect(w->cubeSpinBoxHeight, 0, w, 0 );
    2. w->cubeSpinBoxHeight->setValue(0);
    3. connect(w->cubeSpinBoxHeight, SIGNAL(valueChanged(int)),w, SLOT(w->setCubeDimension(int)));
    To copy to clipboard, switch view to plain text mode 
    But connect don't work! The re-connect is the same in the qtDesigner (and at startup it works!). What do I wrong?
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: connect

    Quote Originally Posted by mickey
    SLOT(w->setCubeDimension(int))
    SLOT macro should contain only the signature. Remove the "w->".

    Or better try:
    Qt Code:
    1. w->cubeSpinBoxHeight->blockSignals( true );
    2. w->cubeSpinBoxHeight->setValue(0);
    3. w->cubeSpinBoxHeight->blockSignals( false );
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. A signal/slot connect isn't working.
    By Daimonie in forum Qt Programming
    Replies: 6
    Last Post: 15th February 2009, 22:55
  2. Replies: 12
    Last Post: 18th September 2008, 15:04
  3. connect problem QDialog
    By Zergi in forum Newbie
    Replies: 1
    Last Post: 1st January 2008, 13:36
  4. Replies: 5
    Last Post: 28th August 2006, 14:36

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.