Alik
Posts: 10
Joined: Fri Feb 01, 2013 10:30 pm

Qt5 QGLWidget issues

Fri Feb 08, 2013 5:24 am

Hello,

I am running into some strange issues with Qt5. I have encountered the same issues both with a version I built myself (on the Pi using distcc) and with the binaries from http://twolife.be/raspbian/ (boy I wish I had found those before I built one myself! :P). I'm using the latest Raspbian image. I've searched the forums and don't see any discussion of these issues, though I was searching by error message and might have missed something.

These issues can be seen in the Qt OpenGL examples. "hellowindow" and "paintedwindow" seem to work fine (though I haven't compared them to a non-Pi versions), while "hellogl_es2" and "textures" seem to display one rendered frame and then break -- "hellogl_es2" shows a black box where the rendering should be, and the GUI is unresponsive, while "textures" just shows a white grid.

In my own application, I experimented and found that when I included a QGLWidget on a form, the QGLWidget would work OK, but the rest of the form would behave erratically. I couldn't click any buttons, redrawing was slow and jerky, and in some cases all the buttons just disappeared entirely.

In certain cases, I would also see one or more of these error messages in the output:

* This plugin does not support setParent!
* This plugin does not support propagateSizeHints()
* QOpenGLContext::swapBuffers() called with non-opengl surface

For now I can work around this by not mixing widgets and OpenGL. However, I'd like to have both.

Does everyone encounter these issues? Has anyone solved them?

Thanks in advance!

-Alec

techs1200
Posts: 28
Joined: Thu Jan 24, 2013 7:45 pm

Re: Qt5 QGLWidget issues

Sun Feb 10, 2013 12:37 am

I am using the same repo as you ( http://twolife.be/raspbian/) and have the exact same issues :( I sent an email to the maintainer of that repo to see if he has the same issue...

Alik
Posts: 10
Joined: Fri Feb 01, 2013 10:30 pm

Re: Qt5 QGLWidget issues

Sun Feb 10, 2013 2:07 am

OK, thanks for the reply! In a sense I'm glad to hear that, as it means it's not some mistake I made. Fortunately I don't absolutely need the functionality in my application so it's not a showstopper. If you ever get it working though it would be great to hear about.

chisco
Posts: 2
Joined: Wed Mar 06, 2013 3:50 pm

Re: Qt5 QGLWidget issues

Wed Mar 06, 2013 3:53 pm

I am having a very similar problem with another ARM processor i.MX6.

Are you using Open GL ES2?

Would this be a problem of the openGL driver ?

Alik
Posts: 10
Joined: Fri Feb 01, 2013 10:30 pm

Re: Qt5 QGLWidget issues

Wed Mar 06, 2013 10:33 pm

I am using OpenGL ES 2, yes, but unfortunately I have no idea whether it's related to the drivers. I'm totally new to embedded systems, sorry!

chisco
Posts: 2
Joined: Wed Mar 06, 2013 3:50 pm

Re: Qt5 QGLWidget issues

Wed Mar 06, 2013 10:54 pm

Ok, well i am not an expert on the driver as well.

I'll keep investigating, and if i get an answer i will share it here with you guys. Please keep me posted if you know something from other source


Thanks in advance

tibi38
Posts: 42
Joined: Sat Nov 10, 2012 8:46 am
Location: Europe

Re: Qt5 QGLWidget issues

Mon Mar 25, 2013 9:53 am

Hi,
you wrote QT5. How can I set up the qt5 on raspberry / debian ? Is any guide avaible to setup the environment?
Thanks in advance
Admin of http://bed-and-breakfast-ungarn.de

Alik
Posts: 10
Joined: Fri Feb 01, 2013 10:30 pm

Re: Qt5 QGLWidget issues

Wed Mar 27, 2013 9:38 pm

Hi Tibi,

I recommend using the http://twolife.be/raspbian/ repository. You can add it to your system configuration and then grab Qt5 like any other package. Search around in the forum and you should find the info on how to set it up. Good luck,

Alec

HappyPiUser
Posts: 16
Joined: Thu Mar 28, 2013 7:47 pm

Re: Qt5 QGLWidget issues

Sat Mar 30, 2013 4:03 am

I am a newbie to Qt5 and the Pi, too, but it's obvious to me that it's the route to go.

Thank you for mentioning the repository listed above.

I had read the instructions for building Qt5 from scratch for the Pi and it sounded a bit daunting!

I will do some reading and pull it down the pre-built one.

Thanks again!

yii
Posts: 1
Joined: Fri Apr 19, 2013 10:13 pm

Re: Qt5 QGLWidget issues

Fri Apr 19, 2013 10:25 pm

Hi

I am seeing the same issue with hellogl_es2 and texture, the video core seems stucked after about 40 frames. If I kill -9 the app couple times, the hellogl_es2 can be run after that, not sure whether it's initialization problem of eglfs plugin?
Trying to simplify to single surface, but with qtwidget, the minimal egl surface is 2?

Window::Window()
{
QGridLayout *mainLayout = new QGridLayout;

for (int i = 0; i < 1 /*NumRows*/; ++i) {
for (int j = 0; j < 1 /*NumColumns*/; ++j) {
QColor clearColor;
clearColor.setHsv(((i * NumColumns) + j) * 255
/ (NumRows * NumColumns - 1),
255, 63);
glWidgets[j] = new GLWidget(0, 0);
glWidgets[j]->setClearColor(clearColor);
glWidgets[j]->rotateBy(+42 * 16, +42 * 16, -21 * 16);
mainLayout->addWidget(glWidgets[j], i, j);
connect(glWidgets[j], SIGNAL(clicked()),
this, SLOT(setCurrentGlWidget()));
}
}
setLayout(mainLayout);

Return to “Graphics programming”