Hi,

when using Qt4.7beta1 the following program crashes when the text is
moved with the mouse. Without setting the flag
"QGraphicsItem::ItemIgnoresTransformations", the program works fine.

I have tried on Vista and Linux (both 32Bit).
There is no problem when using version Qt4.5.3 or Qt4.6.

Am I missing something, or is this a bug?

Best regards,
Markus



This code reproduces the problem:

#include <QApplication>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QGraphicsTextItem>

int main(int argc, char *argv[]) {
        QApplication app(argc, argv);

 QGraphicsView *myView = new QGraphicsView();
 QGraphicsScene *myScene = new QGraphicsScene();
 QGraphicsTextItem *myText = new QGraphicsTextItem("try to move this Text");

 myText->setFlag(QGraphicsItem::ItemIsMovable, true);
 myText->setFlag(QGraphicsItem::ItemIgnoresTransformations,
true);//setting this flag will cause a crash when the text is moved
 myScene->addItem(myText);

 myView->setScene(myScene);
 myView->show();
 return app.exec();
}
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to