jthacker
29th May 2010, 05:59
GraphicTest1::GraphicTest1(QWidget *parent)
: QGraphicsView(parent)
{
QGraphicsScene scene;
scene.addText(QString("HELLO, WORLD!"));
setScene(&scene);
show();
}
i have created the class GraphicTest1 : public QGraphicsView {
...
}
in the constructor i have written above code but i'm not getting output hello world.
but it shows only white blank widget.
help me
note:
Qt 4.6.2
Qt Creator 1.3.1
: QGraphicsView(parent)
{
QGraphicsScene scene;
scene.addText(QString("HELLO, WORLD!"));
setScene(&scene);
show();
}
i have created the class GraphicTest1 : public QGraphicsView {
...
}
in the constructor i have written above code but i'm not getting output hello world.
but it shows only white blank widget.
help me
note:
Qt 4.6.2
Qt Creator 1.3.1