Qt-interest Archive, June 2007
Open extern program on 2nd display
Message 1 in thread
Hi,
I ran into a problem trying to start a QProcess (in my case a VLC-Player
instance) on the 2nd display. In my dual monitor configuration my
Qt-Program itself runs on the primary monitor while the QProcess should
be opened onto the secondary monitor.
Any suggestions how to realize this? Can I use anything else instead of
a QProcess, any class I can position freely?
Another way to solve the problem would be a work-around using the Ati
graphic card tool "Hydravision". But there seems to be a problem which
causes the positions of my VLC Player not to be saved correctly. Maybe
it is because I am only working with an invisible dummy-console opened
by my QProcess [vlc.exe --verbose=1 --extraintf rc --rc-quiet
--tcp-caching 2000 --rc-host=127.0.0.1:7777 --no-overlay --one-instance].
Any help would be great.
Thanks in advance
Philip
--
[ signature omitted ]
Message 2 in thread
Hi Philip,
> I ran into a problem trying to start a QProcess (in my case a VLC-Player
> instance) on the 2nd display. In my dual monitor configuration my
> Qt-Program itself runs on the primary monitor while the QProcess should
> be opened onto the secondary monitor.
> Any help would be great.
#include <QDesktopWidget>
#include <QApplication>
#include <QMessageBox>
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
QDesktopWidget *desktop = app.desktop();
QWidget *first = desktop->screen(0);
QWidget *second = desktop->screen(1);
QMessageBox::information(first, "First", "This is the first screen",
QMessageBox::Ok, QMessageBox::NoButton);
QMessageBox::information(second, "Second", "This is the second screen",
QMessageBox::Ok, QMessageBox::NoButton);
return 0;
}
That should help you...
\Ralf
--
[ signature omitted ]
Message 3 in thread
He didn't say if he had access to the VLC-Player code.
Can't you change where something displays by changing the DISPLAY
variable for the process?
-----Original Message-----
From: Ralf Neubersch [mailto:rneuber1@xxxxxxxxxxxxxxx]
Sent: Friday, June 08, 2007 07:14
To: qt-interest@xxxxxxxxxxxxx
Subject: Re: Open extern program on 2nd display
Hi Philip,
> I ran into a problem trying to start a QProcess (in my case a
VLC-Player
> instance) on the 2nd display. In my dual monitor configuration my
> Qt-Program itself runs on the primary monitor while the QProcess
should
> be opened onto the secondary monitor.
> Any help would be great.
#include <QDesktopWidget>
#include <QApplication>
#include <QMessageBox>
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
QDesktopWidget *desktop = app.desktop();
QWidget *first = desktop->screen(0);
QWidget *second = desktop->screen(1);
QMessageBox::information(first, "First", "This is the first
screen",
QMessageBox::Ok, QMessageBox::NoButton);
QMessageBox::information(second, "Second", "This is the second
screen",
QMessageBox::Ok, QMessageBox::NoButton);
return 0;
}
That should help you...
\Ralf
--
[ signature omitted ]