Results 1 to 9 of 9

Thread: Q_OBJECT Problems..

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Posts
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Q_OBJECT Problems..

    Hello all,

    First of all, I'd like to say hello to all of the members here. This looks like a great resource, and I'm sure I'll be back for more help and to help others. Now down to business - I'm making a plugin for MythTV, and I have to include the Q_OBJECT macro in order to create my own slots (necessary). Anyways, I've posted my code below that I used in my header file...the whole plugin compiles correctly, but when I select the plugin from the menu, it does not go forward and show the new screen. I've debugged to the point that I found it works without the Q_OBJECT macro, but it doesn't if I include it; unfortunately, it is necessary. I was wondering if anyone has any ideas as to why it may not be working, and yes, I am using qmake.

    Qt Code:
    1. #ifndef MYTHTIMERS_H
    2. #define MYTHTIMER_H
    3.  
    4. /* QT includes */
    5. #include <qnamespace.h>
    6. #include <qstringlist.h>
    7. #include <qapplication.h>
    8. #include <qbuttongroup.h>
    9. #include <qtimer.h>
    10. #include <qwidget.h>
    11.  
    12. /* MythTV includes */
    13. #include <mythtv/mythcontext.h>
    14. #include <mythtv/mythdialogs.h>
    15.  
    16. /* Script includes */
    17. #include <mythdb.h>
    18.  
    19. class QTimer;
    20.  
    21. class MythTimers : public QObject
    22. {
    23. Q_OBJECT;
    24.  
    25. public:
    26. struct t_remaining
    27. {
    28. int months, days, years, hours, minutes, seconds;
    29. };
    30. MythTimers(QObject * parent=0, const char * name=0);
    31. ~MythTimers();
    32.  
    33. public slots:
    34. void SetAlarmTimer();
    35.  
    36. private:
    37. QTimer *mytimer;
    38. };
    39.  
    40.  
    41. #endif
    To copy to clipboard, switch view to plain text mode 
    Last edited by mkoehle1; 22nd June 2007 at 07:50. Reason: updated contents

Similar Threads

  1. Problems customizing QSlider
    By Antrax in forum Qt Programming
    Replies: 13
    Last Post: 20th December 2011, 07:00
  2. Replies: 2
    Last Post: 8th March 2007, 22:22
  3. Problems
    By euthymos in forum Installation and Deployment
    Replies: 2
    Last Post: 13th June 2006, 19:11
  4. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39
  5. problems with Opengl
    By SlawQ in forum Qt Programming
    Replies: 4
    Last Post: 12th February 2006, 22:49

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
  •  
Qt is a trademark of The Qt Company.