41 lines
697 B
C++
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2012-02-18 12:40:36 +02:00
#include "abc.h"
#include <stdio.h>
2020-02-01 23:06:01 +01:00
#include "abc_p.h"
2012-02-18 12:40:36 +02:00
class PrintAbc : public QObject
{
Q_OBJECT
2016-07-09 11:21:54 +02:00
public:
PrintAbc()
: QObject()
{
}
public slots:
void print() const { printf("abc\n"); }
2012-02-18 12:40:36 +02:00
};
Abc::Abc()
2016-07-09 11:21:54 +02:00
: QObject()
2012-02-18 12:40:36 +02:00
{
}
void Abc::doAbc()
{
PrintAbc pa;
pa.print();
AbcP abcP;
abcP.doAbcP();
}
// check that including the moc file for the cpp file and the header works:
#include "abc.moc"
#include "moc_abc.cpp"
#include "moc_abc_p.cpp"
// check that including a moc file from another header works:
#include "moc_xyz.cpp"