Results 1 to 11 of 11

Thread: Fullscreen QMainWindow, QGLWidget issue on OSX

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Fullscreen QMainWindow, QGLWidget issue on OSX

    But a main window already has a layout.

    Which of the main window elements do you currently need?
    toolbars? statusbar?

    Cheers,
    _

  2. #2
    Join Date
    Jun 2016
    Posts
    6
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Fullscreen QMainWindow, QGLWidget issue on OSX

    Quote Originally Posted by anda_skoa View Post
    But a main window already has a layout.

    Which of the main window elements do you currently need?
    toolbars? statusbar?

    Cheers,
    _
    None, just a QGLWidget added to the main window.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Fullscreen QMainWindow, QGLWidget issue on OSX

    Then the question becomes: why use a QMainWindow at all?
    Why not just have the GL widget as the window itself?

    Cheers,
    _

  4. #4
    Join Date
    Jun 2016
    Posts
    6
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Fullscreen QMainWindow, QGLWidget issue on OSX

    Quote Originally Posted by anda_skoa View Post
    Then the question becomes: why use a QMainWindow at all?
    Why not just have the GL widget as the window itself?

    Cheers,
    _
    It's based on the Qt Widgets Application template in the Qt Creator.

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Fullscreen QMainWindow, QGLWidget issue on OSX

    Ok, so if I understand you correctly, there is no reason to use the QMainWindow.

    In which case just remove it and use your widget as the window.

    Cheers,
    _

  6. #6
    Join Date
    Jun 2016
    Posts
    6
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Fullscreen QMainWindow, QGLWidget issue on OSX

    Quote Originally Posted by anda_skoa View Post
    Ok, so if I understand you correctly, there is no reason to use the QMainWindow.

    In which case just remove it and use your widget as the window.

    Cheers,
    _
    Thanks, just wonder if there is a way to make QGLWidget have a different framebuffer size from its actual size?

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Fullscreen QMainWindow, QGLWidget issue on OSX

    No idea sorry.

    Btw, I think the more current OpenGL widget is QOpenGLWidget, QGLWidget is deprecated

    Cheers,
    _

  8. #8
    Join Date
    Jun 2016
    Posts
    6
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Fullscreen QMainWindow, QGLWidget issue on OSX

    Thanks.

    My final solution is to scale the offscreen buffer to fill the widget myself.

Similar Threads

  1. Replies: 20
    Last Post: 13th June 2012, 01:19
  2. Replies: 10
    Last Post: 28th February 2011, 19:53
  3. Strange Behavior with QGLWidget if Fullscreen
    By Barry79 in forum Qt Programming
    Replies: 2
    Last Post: 8th April 2009, 16:35
  4. switch a QWidget inside a QMainWindow to fullscreen
    By koenux in forum Qt Programming
    Replies: 1
    Last Post: 11th January 2009, 21:25
  5. Replies: 1
    Last Post: 21st November 2008, 07:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.