Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.6.0
-
None
-
4378b168ad289e1acbde9580b750ce04b51260c3
Description
Device: Emulator
Release: 15384f3017978a3
Platform: S60 Emulator
Compiler used: mwccsym2 482
Application: Attached
Launched from: command line
Problem description:
You can see the problem as soon as you launch the app. One button is missing and by clicking the others you can make more buttons disappear.
#include <QtGui/QWidget> #include <QGraphicsView> #include <QGraphicsProxyWidget> #include <QApplication> #include <QPushButton> class MyWidget : public QGraphicsView { Q_OBJECT public: MyWidget(QWidget *parent = 0); ~MyWidget(); private: QGraphicsProxyWidget *m_pGraphicsProxyWidget; }; MyWidget::MyWidget(QWidget *parent) : QGraphicsView(parent) { QGraphicsScene *pScene = new QGraphicsScene(this); setScene(pScene); QWidget *container = new QWidget(0); container->setGeometry(0, 0, 200, 158); QPalette pal = container->palette(); pal.setColor(QPalette::Window, Qt::white); pal.setColor(QPalette::WindowText, Qt::black); container->setPalette(pal); QPushButton *getMeHereButton = new QPushButton("Get me here", container); getMeHereButton->setGeometry(0, 0, 200, 50); QPushButton *addToMyPlacesButton = new QPushButton("Add to My Places", container); addToMyPlacesButton->setGeometry(0, 54, 200, 50); QPushButton *avoidThisAreaButton = new QPushButton("Avoid this area", container); avoidThisAreaButton->setGeometry(0, 108, 200, 50); m_pGraphicsProxyWidget = scene()->addWidget(container); } MyWidget::~MyWidget() { } int main(int argc, char *argv[]) { QApplication a(argc, argv); MyWidget w; w.show(); return a.exec(); }