Added an experimental DrawFrameOnScene method, which takes a raw pointer (as a long) from PyQt5 (i.e. unwrapped by sip), and draws a QBitmap on it.

This commit is contained in:
Jonathan Thomas
2014-01-22 01:08:14 -06:00
parent e4d6c026b7
commit 6dd5a79177
3 changed files with 23 additions and 1 deletions

View File

@@ -204,3 +204,16 @@ void ReaderBase::SetJsonValue(Json::Value root) {
info.audio_timebase.den = root["audio_timebase"]["den"].asInt();
}
}
// Test method to draw a bitmap on a Qt QGraphicsScene
void ReaderBase::DrawFrameOnScene(string path, long _graphics_scene_address) {
// Get pixmap
QGraphicsScene *scene = reinterpret_cast<QGraphicsScene*>(_graphics_scene_address);
QGraphicsPixmapItem *item = new QGraphicsPixmapItem(QPixmap(QString(path.c_str())));
scene->addItem(item);
}