[Qt-interest] Screen
Donal O'Connor
donaloconnor at gmail.com
Mon Apr 20 09:30:58 CEST 2009
Havn't tried it but you could try:
QRect screen =
QApplication::desktop()->screenGeometry(QApplication::desktop()->primaryScreen());
int screenWidth = screen.width();
int screenHeight = screen.height();
Donal
On Mon, Apr 20, 2009 at 8:20 AM, Sujan Dasmahapatra <sdh at lmglasfiber.com>wrote:
> Dear Friends how could I set my view geometry as my desktop.
>
>
>
> scene = new GraphicsScene;
>
> view = new QGraphicsView(scene);
>
> view->setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView,"Geometry
> View"));
>
> view->setGeometry(250,70,1020,646);
>
> view->setParent(this,Qt::SubWindow);
>
> scene->setParent(view);
>
>
>
> you can see ini the above code I am setting the width and height manually
> how could set the width as the desktop width and height as the desktop
> height. Please tell me someone.
>
>
>
>
>
> Kind regards,
> LM Glasfiber R&D (India) Pvt. Ltd.
>
> Sujan Dasmahapatra
> Project Engineer - CFD
>
> Telephone: +91 80 66470248
> Mobile:
> E-mail: sdh at lmglasfiber.com
>
>
>
>
>
>
>
>
>
> --------------------------------------------------------------
>
> This e-mail and any attachments are confidential. If you are not the named
> or intended recipient, please notify the sender immediately and do not
> disclose the contents to any other person, use it for any purpose or store
> or copy the information in any medium. Any unauthorized disclosure, use or
> storage is prohibited and might be unlawful.
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090420/eb646a7c/attachment.html
More information about the Qt-interest-old
mailing list