abhilashm86
5th August 2009, 16:05
i want to add custom svg items to QGraphicsScene, actually tried with scene and graphicsView, but how to add QGraphicsSvgItem to scene, also in following 2 svg's will overlap each other,
i want to add QGraphicsSvgItem to Scene and then achieve drag and drop........
so please tell how to do
void Widget::abhi()
{
// QGraphicsSvgItem *svg1=new QGraphicsSvgItem();
QGraphicsView *gview=new QGraphicsView();
QGraphicsScene *scene=new QGraphicsScene();
scene->addPixmap(QPixmap(":/dragon_head_nicu_buculei_01.svg"));
scene->addPixmap(QPixmap(":/medicina_dottore_archite_01.svg"));
gview->setScene(scene);
gview->setScene(scene);
gview->adjustSize();
gview->showMaximized();
}
i want to add QGraphicsSvgItem to Scene and then achieve drag and drop........
so please tell how to do
void Widget::abhi()
{
// QGraphicsSvgItem *svg1=new QGraphicsSvgItem();
QGraphicsView *gview=new QGraphicsView();
QGraphicsScene *scene=new QGraphicsScene();
scene->addPixmap(QPixmap(":/dragon_head_nicu_buculei_01.svg"));
scene->addPixmap(QPixmap(":/medicina_dottore_archite_01.svg"));
gview->setScene(scene);
gview->setScene(scene);
gview->adjustSize();
gview->showMaximized();
}