Results 1 to 2 of 2

Thread: Custom signal in qt designer

  1. #1
    Join Date
    Nov 2008
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Custom signal in qt designer

    I am using qt-designer intside qt-creator to create the main window of my application. I need a button that emits a signal and a label that changes with this signal. My idea was to connect button's signal to a MainWindow and, from there, send another signal to the label. This way my MainWindow also knows that the button has been clicked.

    When I was doing this, I have seen that I can add a new custom slot to my MainWindow using the designer and I have done this. But I can't find where I have to write the code for this slot. Can anybody help me?

    Thanks in advance!


    PS: When I execute the program, it generates the following output:

    Object::connect: No such slot MainWindow::Slot1()

  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: Custom signal in qt designer

    Quote Originally Posted by txandi View Post
    When I was doing this, I have seen that I can add a new custom slot to my MainWindow using the designer and I have done this. But I can't find where I have to write the code for this slot. Can anybody help me?
    It is supposed to be implemented to the class that gets passed to setupUi().
    J-P Nurmi

Similar Threads

  1. Custom widget - Only works in Designer
    By Darhuuk in forum Qt Tools
    Replies: 6
    Last Post: 8th January 2008, 01:46
  2. Replies: 15
    Last Post: 25th March 2007, 04:40
  3. Global includes with designer custom widgets
    By mab in forum Qt Programming
    Replies: 2
    Last Post: 5th October 2006, 23:06
  4. custom plugin designer property with out a variable?
    By high_flyer in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2006, 20:11
  5. Replies: 4
    Last Post: 2nd March 2006, 00:11

Tags for this Thread

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.