1. OpenSourceRoboticsFoundation
  2. Simulation
  3. gazebo
  4. Issues
Issue #2133 open

Qt5: GUI overlay plugins not working?

Louise Poubel
created an issue

When I open timer_gui.world, the GUI overlays don't show.

GUI plugins seem to be loaded correctly though, KeyboardGUIPlugin is correctly publishing key press messages in simple_arm_teleop.world for example.

Maybe related, when I open Gazebo without any world, I see a weird white line on the top:

whiteline.png

Comments (10)

  1. JenniferBuehler

    I'm having the same problem after updating to the new default branch just yesterday, which now uses Qt5 instead of Qt4. The issue goes away when I add the plugin to the RenderWidget::splitter with RenderWidget::InsertWidget... then it appears below the render window.

    Also, when I add the plugin to the layout RenderWidget::render3DLayout, it works.

    My current guess is that it may have something to do with that the plugin doesn't get added to a layout. But on the other hand, it's weird that it's working for you to just add a child Widget which is then displayed on top of the parent. I would have guessed that Qt5 maybe doesn't like this any more... though admit I'm not sure, I've only used Qt4 before.

    Still working on fixing this up somehow now and will post updates here.

    Meanwhile, a question: Would it be OK to find a solution which involves Layouts?

    And did you also get the issue just after upgrading to Qt5?

  2. Louise Poubel reporter

    So I just tried it now with the gazebo8 beta debian package and no GUI overlays show. When I closed the issue, I was using a version built from source.

    As for a solution using layouts, I imagine that wouldn't be "overlayed" on top of the 3D scene anymore right? That sounds like a big change in behavior...

  3. JenniferBuehler

    Yes, that's a bit of a behaviour change which would be nice to avoid. I'm still trying to get the overlay thing to work, maybe there's other Qt layout-like structures that allow overlaying.

    I'm just making a simple stand-alone (gazebo detached) example to reproduce the error and make sure the having no layout is the actual problem.

  4. Ian Chen

    after uncommenting out the Qt::WA_PaintOnScreen attribute, the gui overlays started showing again. It was causing some gui test failures during early stage of Qt5 integration but maybe the tests can be fixed. We should try bring back the flag.

  5. JenniferBuehler

    Unfortunately, that doesn't solve it for me, still not showing :(

    I have been taking GLWidget apart to reproduce it in my simple standalone test (based on code above). I now have the structure as in MainWindow, RenderWidget and GlWidget, including all the layout stuff, and only removed the gazebo-specific things from GLWidget, to have a setup as similar as possible. I have Qt::WA_PaintOnScreen still commented out, and it still worked with the overlaying in my separate example! I have not been able to figure out yet why it isn't working just the same with the GLWidget in Gazebo. It's strange that everything works fine in the simplified code... the bug must lie deeper inside somewhere.

    But GLWidget must be the culprit, because it is possible to add the GUI plugins to RenderWidget's topToolbar, mainFrame and and bottomFrame without problems. The overlaying itself works, only GLWidget seems to block it, ignore it, or draw over it.

  6. JenniferBuehler

    Alright, I am calling it a day on this issue, hit a few more dead ends.

    I'm thinking that the problem may be what is done with the window here in GLWidget, but I'm not sure as I'm not yet familiar with the code beyond this:

        // Create the OGRE render window
        this->dataPtr->windowId =
          rendering::RenderEngine::Instance()->GetWindowManager()->
            CreateWindow(winHandle, this->width(), this->height(), ratio);
    

    If I comment the whole block and don't create a window (so that windowId remains -1), you can see the GUI plugin for the second before it crashes (crashes presumably because the stuff has been commented). When I do create the window but take out the render call in paintEvent, a black window is displayed, but the plugin is not visible. It seems like the Ogre window stuff is overriding the plugin...

    Any ideas?

  7. Log in to comment