Results 1 to 5 of 5

Thread: QGLWidgets

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QGLWidgets

    I am trying to work on a program on Solaris with 4 monitors. I open the program on Monitor 0 and tell a window containing 3 QGLWidgets to open up on Monitor 1. I have the QGLWidgets inside a layout. When the window opens inside Monitor 1, the 3 QGLWidgets draw, but they draw in their correct spot on Monitor 0. Where they should be on Monitor 1 are transparent areas which show whatever was behind the window once it opened. Does anyone have any idea why the OpenGL stuff is showing on the wrong monitor? Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGLWidgets

    Do other (non-Qt) OpenGL applications behave as expected? What about Qt OpenGL demos?

  3. #3
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Red face Re: QGLWidgets

    Yes they do. We have a current program that is using Motif and OpenGL to run our application but we want to move from Motif to Qt. Our system runs with 4 monitors, each behaving as its own desktop. So you cannot drag terminals and other windows from one monitor to the next, they must stay on the monitor on which they were told to open. We can get the Qt GUI part to display on the correct monitor but the QGLWidgets that we create stay on the monitor in which the main application was loaded on. The main application loads on whichever monitor the user chooses, but we have many screens the user can open and they are used to certain screens opening on certain monitors and we want to keep it this way to make use of the 4 monitors. Since we were able to do this in Motif and OpenGL many years ago, and now it is not working with Qt, I thought this was a Qt problem. But maybe it is more of an OpenGL problem in that we have to tell the OpenGL which monitor to draw in as well as telling Qt. Do you have any more ideas? Thanks!

  4. #4
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QGLWidgets

    I'm not sure as to why it would be like this, other than to GUESS that the widgets somehow derive the monitor that the MainWindow is running on as root. I would suggest running the OpenGL Widgets in their own threads, and creating them with a parent that is not the MainWindow.

  5. #5
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Cool Re: QGLWidgets

    I was able to get this to start working correctly. I was using a QDesktopWidget to choose which monitor to display the various windows on but apparently I needed to pass this down to my children QGLWidgets so they knew which monitor to draw on too. By passing this in I am now able to get my QGLWidgets to draw in the correct spaces in the correct monitors! Thanks for all your help!

Similar Threads

  1. Textures + Multiple QGLWidgets
    By KShots in forum Qt Programming
    Replies: 8
    Last Post: 19th October 2007, 21:23
  2. QGridLayout
    By ToddAtWSU in forum Qt Programming
    Replies: 5
    Last Post: 29th June 2006, 20:34

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.