Results 1 to 2 of 2

Thread: Missing slots

  1. #1
    Join Date
    Jan 2006
    Posts
    46
    Qt products
    Qt3
    Platforms
    Unix/X11

    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?

    Mariane

  2. #2
    Join Date
    Jan 2006
    Posts
    46
    Qt products
    Qt3
    Platforms
    Unix/X11

    Lightbulb Re: Missing slots

    Got it!

    In mazebox.h I needed

    class MazeBox: public QWidget {
    Q_OBJECT
    public:
    void trySlotInMazeBox();
    etc...


    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.

    Mariane

Similar Threads

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

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.