Results 1 to 5 of 5

Thread: connection

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

    Default connection

    hi, from mainform.cpp I need to do a connetion like this:
    connect (button, singnal(my()), ........., SLOT(mySlot()));
    where mySlot() is a static SLOT declared in mywidget.h;
    what do I put in connect? thanks
    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: connection

    There is no such thing as "static slot".

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

    Default Re: connection

    so I can't declare a slot as:
    Qt Code:
    1. public slots:
    2. static mySlot();
    To copy to clipboard, switch view to plain text mode 
    I have some instance of an object but I require only a SLOT...........
    furthermore (to don't open other post): I have a slider1 connect to a dial and a mySLot().
    I need block signal only to mySlot(). possible? thanks
    Regards

  4. #4
    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: connection

    Quote Originally Posted by mickey
    so I can't declare a slot as:
    Yes, you can't.

    Quote Originally Posted by mickey
    I have a slider1 connect to a dial and a mySLot().
    I need block signal only to mySlot().
    Qt allows you only to block all signals at once.

  5. #5
    Join Date
    Jul 2006
    Posts
    79
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: connection

    you can make a wrapper slot that calls the static function..

    regards..
    aman..

Similar Threads

  1. connection problem
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 7th July 2006, 22:14
  2. Replies: 3
    Last Post: 22nd June 2006, 16:27
  3. How do I keep the client connection open ?
    By probine in forum Newbie
    Replies: 2
    Last Post: 25th March 2006, 19:06
  4. Replies: 10
    Last Post: 6th March 2006, 16:08
  5. Can I launch a dial-up connection in Windows?
    By gtthang in forum Qt Programming
    Replies: 3
    Last Post: 9th February 2006, 12:32

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.