view cpp/qt_core/test/Objects.cpp @ 372:a032df77b6ab

Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
author Max Samukha <maxter@spambox.com>
date Thu, 08 Jul 2010 17:19:05 +0300
parents
children
line wrap: on
line source
#include <QObject>
#include <QEvent>

extern "C" void* qtd_test_QObject_create(void* parent)
{
    return new QObject((QObject*)parent);
}

extern "C" void qtd_test_QObject_delete(void* nativeId)
{
    delete (QObject*)nativeId;
}

extern "C" void qtd_test_QObject_event(void* nativeId)
{
     QEvent event(QEvent::None);
    ((QObject*)nativeId)->event(&event);
}