swarupa
2nd February 2016, 18:03
hi all ,
I am new to Qt
can anybody help me for displaying images continuously in qt
my sample code is here
int i = 1;
for(; i < 31 ; i++)
{
char buffer[50] = "/home/rupa/Qtdisplay/";
sprintf(str2, "%i.jpeg", i);
strcat(buffer, str2);
QFile jpgfile(buffer);
jpgfile.open(QFile::ReadOnly);
QByteArray contents = jpgfile.readAll();
image.loadFromData(contents, "JPEG");
scene = new QGraphicsScene(this);
scene->addPixmap(image);
ui->graphicsView->setScene(scene);
ui->graphicsView->show();
}
I am new to Qt
can anybody help me for displaying images continuously in qt
my sample code is here
int i = 1;
for(; i < 31 ; i++)
{
char buffer[50] = "/home/rupa/Qtdisplay/";
sprintf(str2, "%i.jpeg", i);
strcat(buffer, str2);
QFile jpgfile(buffer);
jpgfile.open(QFile::ReadOnly);
QByteArray contents = jpgfile.readAll();
image.loadFromData(contents, "JPEG");
scene = new QGraphicsScene(this);
scene->addPixmap(image);
ui->graphicsView->setScene(scene);
ui->graphicsView->show();
}