[Qt-interest] Re : Re : Rendering widget on Multiple screens

Nitin Mahajan nitinm76 at yahoo.com
Mon Dec 14 04:26:20 CET 2009


Hello,

--- On Fri, 11/12/09, Martin Guillon <MGuillon at movea.com> wrote:

> From: Martin Guillon <MGuillon at movea.com>
> Subject: RE: [Qt-interest] Re :  Re :  Rendering widget on Multiple screens
> To: "nitinm76 at yahoo.com" <nitinm76 at yahoo.com>, "qt-interest at trolltech.com" <qt-interest at trolltech.com>
> Date: Friday, 11 December, 2009, 7:36 PM
> Here you go. It s an example where I
> move to the screen the mouse is on:
> 

Thanks for your inputs. How to start the multiple screens so that they are part of a Virtual desktop?

I started multiple screens by setting the QWS_DISPLAY env variable like this

export QWS_DISPLAY="Multi: QVFb:0 QVFb:1 QVFb:offset=20,0:2", Is that the write way for the example code to work? I think, it is not, cuase the mouse cursor is seen on all the screens.

What would be the alternate way to start the multiple screens?

regards

-Nitin

> static int findScreenHoldingMouse()
> {
>             return
> QApplication::desktop()->screenNumber(QCursor::pos());
> }
> ;
> 
> Then in your code:
> 
> int screen = findScreenHoldingMouse();
> move(QApplication::desktop()->screenGeometry(screen).x(),
>            
> QApplication::desktop()->screenGeometry(screen).y());
> 
> This will move the widget to the 0,0 of the screen where
> the mouse is. You can replace screen with
> QApplication::desktop()->primaryScreen() if you want the
> master screen.
> 
> Martin
> 
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com
> [mailto:qt-interest-bounces at trolltech.com]
> On Behalf Of Nitin Mahajan
> Sent: Friday, December 11, 2009 2:13 PM
> To: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] Re : Re : Rendering widget on
> Multiple screens
> 
> Hello,
> 
> --- On Thu, 10/12/09, Bill King <bill.king at nokia.com>
> wrote:
> 
> > From: Bill King <bill.king at nokia.com>
> > Subject: Re: [Qt-interest] Re :  Re : 
> Rendering widget on Multiple 
> > screens
> > To: qt-interest at trolltech.com
> > Date: Thursday, 10 December, 2009, 10:50 AM
> > 
> > 
> > 
> > 
> >   
> > 
>> > This is the way we used to do it in Qtopia, and it
> seems to work.
> > 
> > 
> > 
> Do you have some sample code related to this? I have posted
> the results of my experiment in a earlier mail. Could you
> please point out what might have gone wrong.
> 
> regards
> 
> -Nitin
> 
> 
> > On 12/10/2009 02:42 AM, ext Martin Guillon wrote:
> > 
> > 
> >   
> >   
> > 
> >   
> >   
> >   That
> > s easy with qt. 
> >   Just
> > get access to the position of the screen you want to
> put your widget 
> > on, using QDesktopWidget::availableGeometry()
> >   
> >   
> >   Then
> > move your widget
> >   
> >   
> >   Martin
> >   
> >   
> >   
> >   
> >   From:
> > qt-interest-bounces at trolltech.com
> > [mailto:qt-interest-bounces at trolltech.com]
> > On Behalf Of BOUCARD
> > Olivier
> > 
> >   Sent: Wednesday, December 09, 2009
> 4:29 PM
> > 
> >   To: Oliver.Knoll at comit.ch;
> > qt-interest at trolltech.com
> > 
> >   Subject: [Qt-interest] Re : Re :
> Rendering widget on Multiple 
> > screens
> >   
> >   
> >      
> >   
> >   
> >   Ok, I
> > misunderstood the problem.
> > 
> > A simplified version of the question might be "How I
> can put my 
> > widgets on a given screen?" ?
> > 
> > I don't see any solution (using Qt) except the
> solution of Oliver 
> > Knoll if it works.
> >   
> >   
> >      
> >   
> >   
> >   
> >   De :
> > "Oliver.Knoll at comit.ch"
> > <Oliver..Knoll at comit.ch>
> > 
> >   À : qt-interest at trolltech.com
> > 
> >   Envoyé le : Mer 9 Décembre 2009,
> 16
> > h 15 min 12 s
> > 
> >   Objet : Re: [Qt-interest] Re :
> Rendering widget on Multiple screens
> > 
> >   
> > 
> > BOUCARD Olivier wrote on Wednesday, December 09, 2009
> 4:05
> > PM:
> > 
> >   
> > 
> > > Why don't use screen cloning from your graphic
> > controller driver?
> > 
> >   
> > 
> > Because he does not want to use screen *clonging*:
> > 
> >   
> > 
> > > while other widgets of same application to get
> > rendered on
> > different
> > 
> > > screen(QVFb: 1)?
> > 
> >   
> > 
> > "other widgets" implies that you see set A of widgets
> on screen 0 and 
> > a
> > *different* set B of widgets on screen 1 -> no
> simle *cloning*.
> > 
> >   
> > 
> > Cheers, Oliver
> > 
> > --
> > 
> > Oliver Knoll
> > 
> > Dipl. Informatik-Ing. ETH
> > 
> > COMIT AG - ++41 79 520 95 22
> > 
> > _______________________________________________
> > 
> > Qt-interest mailing list
> > 
> >   Qt-interest at trolltech.com
> > 
> >   http://lists.trolltech.com/mailman/listinfo/qt-interest
> > 
> >   
> >   
> >   
> >      
> >   
> > 
> > 
> > 
> > 
> > 
> > --
> > Bill King, Software Engineer
> > Qt Development Frameworks, Nokia Pty Ltd Brisbane
> Office
> > 
>> > 
> > 
> > -----Inline Attachment Follows-----
> > 
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> > 
> 
> 
>       New Email names for you! 
> Get the Email name you've always wanted on the new
> @ymail and @rocketmail. 
> Hurry before someone else does!
> http://mail.promotions.yahoo.com/newdomains/aa/
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 


      New Email names for you! 
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/




More information about the Qt-interest-old mailing list