Hi,
what does "invalid drawable" as an application output in Qt Simulator indicate?
What can I do to get rid of this output or the source problem?
Hi,
what does "invalid drawable" as an application output in Qt Simulator indicate?
What can I do to get rid of this output or the source problem?
Last edited by planetLars; 2012-02-15 at 16:56. Reason: Qt Designer -> Qt Simulator
Hi,
What are the QT widgets that you are using and how? Or some code snippet that gives this problem
I only have a QGraphicsView put with Qt Designer next to the default MainWindow and centralWidget.
The View has every property at default except for: geometry, frameShape, frameShadow, lineWidth, verticalScrollbar and horizontalScrollbar which are put to 0, None or Off (geometry is at 0,40,360,600).
The other 2 have everything at default except geometry which are 0,0,360,640.
I use the view by showing a QGraphicsScene which has some items added via code, nothing else.
The error is output right after application launch.
Hi,
I tried exactly as mentioned above and i am unable to reproduce the error -
My code looks like -
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this); // the ui form is designed to have a QGraphicsView put next to the default centralWidget in MainWindow with the properties exactly as mentioned in your post #2 except goemtry properties, those i have set in code below and not in the ui form.
setGeometry(0,0,360,640);
ui->graphicsView->setGeometry(0,40,360,600);
QGraphicsScene scene;
scene.setSceneRect( -100.0, -100.0, 200.0, 200.0 );
QGraphicsEllipseItem *item = new QGraphicsEllipseItem( 0, &scene );
item->setRect( -50.0, -50.0, 100.0, 100.0 );
ui->graphicsView->setScene(&scene);
}
main.cpp
just shows the mainwindow. So it works proper for me.
When i search for this error, i always see references to usage of QGLWidget have caused invalid drawable error sometimes. But could not find what could be the actual problem.
i have tested this on qtsimulator with QTSDK 1.1.4 on ubuntu. But the platform or sdk should nt be a problem.
Thank you for your effort.
I reset every property of the View and the MainWindow, set the geometry by code and even out-commented the scene->addItem()s so I had a Scene with a empty View only (and my code now is basically the same as yours plus unused Item definitions and my Scene is a pointer). I get this result rendered but the application output still writes "invalid drawable".
I'm on Mac OS X Lion and my target is Simulator Qt for gcc with an N8 set as the rendering device with Nokia SDK 1.2
Last edited by planetLars; 2012-02-17 at 07:34. Reason: added SDK version, corrected a statement
Ok, somehow skeptic that this is a bug related to MAC though not sure. Can you please file a bug for it in QT bug reports - https://bugreports.qt-project.org/
I wouldn't think of it too, however the lack of information about what "illegal drawable" indicates surely can get remedied. I filed a bug report.