Could someone please tell me what is wrong with this piece of code? I'm using Qt 4.5.3 on Unix/X11
Qt Code:
#include <QGraphicsView> #include <QGraphicsScene> int main(int argc, char *argv[]) { s.addText("hello"); v.show(); return 0; }To copy to clipboard, switch view to plain text mode
It gives me a core dump right after I declare a QGraphicsScene with the following backtrace.
#0 QGraphicsScenePrivate::init (this=0x5012e0) at ../../include/QtGui/../../src/gui/kernel/qapplication.h:102
102 #ifndef QT_NO_STYLE_STYLESHEET
(gdb) where
#0 QGraphicsScenePrivate::init (this=0x5012e0) at ../../include/QtGui/../../src/gui/kernel/qapplication.h:102
#1 0x0000002a95e22e95 in QGraphicsScene (this=0x7fbffff610, parent=0x0) at graphicsview/qgraphicsscene.h:276
#2 0x000000000040082f in main () at main.cpp:9
Bookmarks