May 3, 2012

Leon Leon
Robot Herder
400 posts

[Closed] Is there a problem showing a window fullscreen with showFullScreen ()?

 

I want my application to be full screen..
So

  1. MainWindow w;
  2.     w.showFullScreen();

works perfect for me.. But i see many people saying that there are some problems..
Should i do something else? If yes tell me this.. I can see the width and height of my screen with this

  1. QDesktopWidget * desk = qApp->desktop() ;
  2.     int width = desk->width() ;
  3.     int height = desk->height() ;

Then what?

  1. MainWindow w;
  2.     w.setGeometry(width,height);
  3.     w.showFullScreen();

won’t work with error:
no matching function for call to ‘MainWindow::setGeometry(int, int)’

The application is intented mainly for ubuntu 12.04(+), maybe windows and maybe mac.. Never have tried the windows or mac one.. So i am just asking if showFullScreen () is a problem…

Thanks for any answer, Leon

3 replies

May 3, 2012

jobor jobor
Lab Rat
18 posts

I’ve not seen any problem with showFullScreen().

If there is any, then the problem should be reported in the bug tracker.

May 3, 2012

Daniel Eder Daniel Eder
Lab Rat
64 posts

I personally never experienced any problems with showFullScreen() – on either Linux (Ubuntu) or Windows platforms.

If you are seeing any problems with that function I’d use a workaround like you suggested but the function for changing the window size of your application is QWidget::resize() [qt-project.org] I’d suspect.

May 3, 2012

Leon Leon
Robot Herder
400 posts

Ok then, thanks ;)

 
  ‹‹ Transparent widgets are not moving with their parent      How to best track down a problem that seems to be related to signals ››

You must log in to post a reply. Not a member yet? Register here!