Hi,

I have a problem with screen index on my Fedora 16.

i'm trying to detect what is the resolution of the current screen, so i do :
Qt Code:
  1. QDesktopWidget monEcran;
  2. cout << "nbre: " << monEcran.screenCount()<<endl;
  3. int screenIndex = monEcran.screenNumber(this);
  4. LargeurFen=monEcran.screenGeometry(screenIndex ).width();
  5. hauteurFen=monEcran.screenGeometry(screenIndex ).height();
To copy to clipboard, switch view to plain text mode 
nbre is the number of screens, and it shows 2 screens. So my second screen is okay.

But the screenindex value is always 0, when i start my program on the first screen, it returns 0, and on the second screen, it returns 0 too...

I don't understand... But if i put manually screenIndex to 1, LargeurFen and hauterFen have the good values, it's the resolution of the second ecran...

I also tryied to do it with a new project, with the basic windows and it's the same issue.

Thanks advance for your help,

ps : sorry for my bad english xD