Results 1 to 2 of 2

Thread: Missing slots

  1. #1
    Join Date
    Jan 2006
    Qt products

    Default Missing slots

    In a file called mazebox.h I have defined signals and slots. But when I run
    the program it says "No such slot QWidget::trySlot()".

    When I looked back in the Designer, I saw that I couldn't use "Edit" "Connections"
    there either. It doesn't show my slots (or signals) and the "Edit slots" option is
    grayed out. In fact, the only file the Designer is apparently ready to modify is
    this .ui.h file. I didn't manage to tell it to look at my mazebox.h file and list the
    signals and slots written there...

    How can I do this, please?


  2. #2
    Join Date
    Jan 2006
    Qt products

    Lightbulb Re: Missing slots

    Got it!

    In mazebox.h I needed

    class MazeBox: public QWidget {
    void trySlotInMazeBox();

    and I had forgotten to write Q_OBJECT ... It still compiled but it needed a def
    in mazebox.cpp to compile

    (By def I mean even an empty def like
    void MazeBox::trySignalFromMazebox() {} )

    Took me ages, because of course I kept staring at the signal definition and
    not a few lignes above...

    2H55 AM, going to bed, so good night to everyone in the same time zone.


Similar Threads

  1. Signals and Slots Problem
    By GenericProdigy in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2009, 10:06
  2. Signals and Slots
    By 83.manish in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 11:31
  3. Replies: 12
    Last Post: 23rd June 2008, 09:05
  4. Slots or new slots
    By Colx007 in forum Qt Programming
    Replies: 3
    Last Post: 21st January 2008, 18:38
  5. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 19th May 2006, 00:28


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.