2

how to create a fullscreen application, with no window frame, to simulate a 'virtual desktop'? I would like to know if it's possible using java and Qt C++? and what are the syntaxe for doing such thing in both languages?

Cœur
  • 37,241
  • 25
  • 195
  • 267
maximz101
  • 678
  • 1
  • 8
  • 20
  • 1
    you can do it using java. Take a look here: http://stackoverflow.com/questions/6890379/java-setfullscreenwindow-hides-log-in-dialog-in-mac/6890658#6890658 – AlexR Aug 01 '11 at 07:06
  • You can use `QDesktopWidget` in Qt to handle full screen, multiple monitor, etc. – AJG85 Aug 01 '11 at 17:14

1 Answers1

2

To show a Qt widget fullscreen:

#include <QtGui>
#include <QtCore>

int
main(int argc, char* argv[])
{
  QApplication app(argc, argv);
  QWidget widget;

  //widget.show();  
  widget.showFullScreen();

  app.exec();
  return 0;
}
Adversus
  • 2,166
  • 20
  • 23
  • in java this solution works: GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(this); – maximz101 Aug 02 '11 at 08:11