I'm writing a linux Qt application that needs to be able to work on both single head systems and dual head systems. I need to cover users who use a virtual desktop and those who do not. One of my QDockWidgets needs to have the ability to go to full screen if the user desires. The user can state which monitor the full screen sized QDockWidget can appear.

I have almost all cases working. However, I am stumped for the case when the user is NOT using a virtual desktop. I cannot figure out how to get a floating QDockWidget appear on the second display in that mode. (fyi. In this mode you cannot simply drag a window from one monitor to another) Has *anyone* figured out a way to do this?

Here's what I do in the case that the user is using a virtual desk top.

int screenNumber = settings.value( "preferences.screenNumber", QVariant( 1 ) ).toInt();
useScreen = screenNumber;

myTitleWidget = new QWidget( parentWidget() );
setTitleBarWidget( myTitleWidget );
if ( QApplication::desktop()->isVirtualDesktop() )
{
setGeometry( QApplication::desktop()->screenGeometry( useScreen ));
show();
}

Thanks

(I need a 'pulling my hair out' emoticon)