Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Make QGLWidget fullscreen when double clicked in Qt5

Make QGLWidget fullscreen when double clicked in Qt5

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mellow
    wrote on last edited by
    #1

    I'm trying to make a QGLWidget inside another window go fullscreen when double clicked then back to the parent window when double clicked again. I achieved this in Qt 4.8 with the following code:

    @void GLVideoWidget::mouseDoubleClickEvent(QMouseEvent *e)
    {
    if(isFullScreen())
    {
    setWindowFlags(Qt::Widget);
    showNormal();
    }
    else
    {
    setWindowFlags(Qt::Window);
    showFullScreen();
    }
    }@

    In Qt5 this doesn't work anymore. When first double clicked, the widget goes fullscreen, but when I double click it again, it just disappears and isn't part of the parent window anymore. Any thoughts?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mellow
      wrote on last edited by
      #2

      I still need help with this, so if anyone could hep I would be thankful.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        This can either be a regression or a new behavior. What exact version of Qt are you using and on what OS ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mellow
          wrote on last edited by
          #4

          [quote author="SGaist" date="1400707525"]Hi,

          This can either be a regression or a new behavior. What exact version of Qt are you using and on what OS ?[/quote]

          I'm using Qt 5.2.1 running on Ubuntu 14.04

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Then I would recommend getting a look at the "bug report system":http://bugreports.qt-project.org to see if something known. If not you could consider opening a new report providing a minimal compilable example that shows the change of behavior

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved