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.
#ifndef MYTHTIMERS_H
#define MYTHTIMER_H
/* QT includes */
#include <qnamespace.h>
#include <qstringlist.h>
#include <qapplication.h>
#include <qbuttongroup.h>
#include <qtimer.h>
#include <qwidget.h>
/* MythTV includes */
#include <mythtv/mythcontext.h>
#include <mythtv/mythdialogs.h>
/* Script includes */
#include <mythdb.h>
{
Q_OBJECT;
public:
struct t_remaining
{
int months, days, years, hours, minutes, seconds;
};
MythTimers
(QObject * parent
=0,
const char * name
=0);
~MythTimers();
public slots:
void SetAlarmTimer();
private:
};
#endif
#ifndef MYTHTIMERS_H
#define MYTHTIMER_H
/* QT includes */
#include <qnamespace.h>
#include <qstringlist.h>
#include <qapplication.h>
#include <qbuttongroup.h>
#include <qtimer.h>
#include <qwidget.h>
/* MythTV includes */
#include <mythtv/mythcontext.h>
#include <mythtv/mythdialogs.h>
/* Script includes */
#include <mythdb.h>
class QTimer;
class MythTimers : public QObject
{
Q_OBJECT;
public:
struct t_remaining
{
int months, days, years, hours, minutes, seconds;
};
MythTimers(QObject * parent=0, const char * name=0);
~MythTimers();
public slots:
void SetAlarmTimer();
private:
QTimer *mytimer;
};
#endif
To copy to clipboard, switch view to plain text mode
Bookmarks