Search code examples
qtuser-interfaceqt-creatormultiple-monitors

multiple monitor application development with Qt and QtCreator


I am developing a Qt application, using QtCreator. The application is required to display on multiple monitors (if available).

The GUI requirements w.r.t diaplay are essentially:

  1. If there are multiple monitors, use them - i.e. display/remember window positions across the monitors
  2. If there is only one monitor, simply display everything on that one monitor

My assumption is that the machine's graphics card will represent the multiple monitors into a single 'virtual' desktop, which my applications can then 'write to', in an agnostic fashion.

My question is essentially this:

Is there anything special that I need to do (e.g. use special classes etc when designing my widgets etc), when developing an app that can use multiple windows

  • OR -

Do I develop as per normal, and leave all the monitor management to the display cards?

Is


Solution

  • I think QDesktopWidget has all features you need.

    From Qt Documentation:

    Widgets provided by Qt use this class to place tooltips, menus and dialog boxes on the correct screen for their parent or application widgets. Applications can use this class to obtain information that can be used to save window positions, or to place child widgets and dialogs on one particular screen.