Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.5.2
-
None
Description
QWidgets via QGraphicsWidgetProxy do not layout properly on Carbon.
On almost every load one of the widgets in the layout will jump positions after about a second.
On Cocoa the widgets stay still (as expected)
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget *panel = new QWidget();
QVBoxLayout *layout = new QVBoxLayout(panel);
panel->resize(600,600);
layout->addWidget(new QLabel("Run this a couple of times under Carbon and Cocoa, in Cocoa the proxys do not move."));
QGraphicsScene *scene = new QGraphicsScene(panel);
QGraphicsView *view = new QGraphicsView(scene);
layout->addWidget(view);
QLineEdit *lineEdit1 = new QLineEdit("edit 1 is going to hide now.");
QGraphicsProxyWidget *item1 = new QGraphicsProxyWidget();
item1->setWidget(lineEdit1);
item1->setPos(10, 10);
scene->addItem(item1);
QLineEdit *lineEdit2 = new QLineEdit("edit 2");
QGraphicsProxyWidget *item2 = new QGraphicsProxyWidget();
item2->setWidget(lineEdit2);
item2->setPos(10, 40);
scene->addItem(item2);
QSlider *slider = new QSlider(Qt::Horizontal);
QGraphicsProxyWidget *item3 = new QGraphicsProxyWidget();
item3->setWidget(slider);
item3->setPos(10, 70);
scene->addItem(item3);
panel->show();
return app.exec();
}