Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 3261

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdesktopwidget.qdoc -->
  <title>QDesktopWidget Class | Qt Widgets 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QDesktopWidget</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#obtaining-a-desktop-widget">Obtaining a Desktop Widget</a></li>
<li class="level2"><a href="#screen-geometry">Screen Geometry</a></li>
<li class="level2"><a href="#use-of-the-primary-screen">Use of the Primary Screen</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QDesktopWidget Class</h1>
<!-- $$$QDesktopWidget-brief -->
<p>The <a href="qdesktopwidget.html">QDesktopWidget</a> class provides access to screen information on multi-head systems. <a href="#details">More...</a></p>
<!-- @@@QDesktopWidget -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QDesktopWidget&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qwidget.html">QWidget</a></td></tr></table></div><ul>
<li><a href="qdesktopwidget-members.html">List of all members, including inherited members</a></li>
<li><a href="qdesktopwidget-obsolete.html">Obsolete members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qdesktopwidget.html#primaryScreen-prop">primaryScreen</a></b> : const int</li>
<li class="fn"><b><a href="qdesktopwidget.html#screenCount-prop">screenCount</a></b> : const int</li>
<li class="fn"><b><a href="qdesktopwidget.html#virtualDesktop-prop">virtualDesktop</a></b> : const bool</li>
</ul>
<ul>
<li class="fn">59 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> const QRect </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#availableGeometry">availableGeometry</a></b>(int <i>screen</i> = -1) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRect </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#availableGeometry-1">availableGeometry</a></b>(const QWidget *<i>widget</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRect </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#availableGeometry-2">availableGeometry</a></b>(const QPoint &amp;<i>p</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#virtualDesktop-prop">isVirtualDesktop</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#primaryScreen-prop">primaryScreen</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#screen">screen</a></b>(int <i>screen</i> = -1)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#screenCount-prop">screenCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRect </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#screenGeometry">screenGeometry</a></b>(int <i>screen</i> = -1) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRect </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#screenGeometry-1">screenGeometry</a></b>(const QWidget *<i>widget</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QRect </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#screenGeometry-2">screenGeometry</a></b>(const QPoint &amp;<i>p</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#screenNumber">screenNumber</a></b>(const QWidget *<i>widget</i> = Q_NULLPTR) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#screenNumber-1">screenNumber</a></b>(const QPoint &amp;<i>point</i>) const</td></tr>
</table></div>
<ul>
<li class="fn">214 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
<li class="fn">14 public functions inherited from <a href="../qtgui/qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#primaryScreenChanged">primaryScreenChanged</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#resized">resized</a></b>(int <i>screen</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#screenCountChanged">screenCountChanged</a></b>(int <i>newCount</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#workAreaResized">workAreaResized</a></b>(int <i>screen</i>)</td></tr>
</table></div>
<ul>
<li class="fn">3 signals inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdesktopwidget.html#resizeEvent">resizeEvent</a></b>(QResizeEvent *<i>event</i>)</td></tr>
</table></div>
<ul>
<li class="fn">35 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">5 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
<li class="fn">35 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
<li class="fn">1 protected type inherited from <a href="../qtgui/qpaintdevice.html#protected-variables">QPaintDevice</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDesktopWidget-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qdesktopwidget.html">QDesktopWidget</a> class provides access to screen information on multi-head systems.</p>
<p>Systems with more than one graphics card and monitor can manage the physical screen space available either as multiple desktops, or as a large virtual desktop.</p>
<p>This class provides information about the user's desktop, such as its total size, number of screens, the geometry of each screen, and whether they are configured as separate desktops or a single virtual desktop.</p>
<p>Widgets provided by Qt use this class to place tooltips, menus and dialog boxes on the correct screen for their parent or application widgets. Applications can use this class to obtain information that can be used to save window positions, or to place child widgets and dialogs on one particular screen.</p>
<a name="obtaining-a-desktop-widget"></a>
<h3 >Obtaining a Desktop Widget</h3>
<p>The <a href="qapplication.html#desktop">QApplication::desktop</a>() function is used to get an instance of <a href="qdesktopwidget.html">QDesktopWidget</a>.</p>
<p>The widget's <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>() function provides information about the geometry of the available screens with. The number of screens available is returned by <a href="qdesktopwidget.html#screenCount-prop">screenCount</a>, and the <a href="qdesktopwidget.html#screenCountChanged">screenCountChanged</a>() signal is emitted when screens are added or removed. The screen number that a particular point or widget is located in is returned by <a href="qdesktopwidget.html#screenNumber">screenNumber</a>().</p>
<a name="screen-geometry"></a>
<h3 >Screen Geometry</h3>
<p>To obtain the dimensions of a particular screen, call the <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>() function. On some desktop environments, not all of the screen is available for applications to use; for example, an application dock or menu bar may take up some space. Use the <a href="qdesktopwidget.html#availableGeometry">availableGeometry</a>() function to obtain the available area for applications.</p>
<p><a href="qdesktopwidget.html">QDesktopWidget</a> also inherits the <a href="qwidget.html">QWidget</a> properties, <a href="qwidget.html#width-prop">width</a>() and <a href="qwidget.html#height-prop">height</a>(), which specify the size of the desktop. However, for desktops with multiple screens, the size of the desktop is the union of all the screen sizes, so <a href="qwidget.html#width-prop">width</a>() and <a href="qwidget.html#height-prop">height</a>() should <i>not</i> be used for computing the size of a widget to be placed on one of the screens.</p>
<p>On systems that are configured to use the available screens as a single, large virtual desktop, the <a href="qdesktopwidget.html#virtualDesktop-prop">virtualDesktop</a> property will be set to true. In this case, the widget's size is usually the size of the bounding rectangle of all the screens.</p>
<a name="use-of-the-primary-screen"></a>
<h3 >Use of the Primary Screen</h3>
<p>For an application, the screen where the main widget resides is the primary screen. This is stored in the <a href="qdesktopwidget.html#primaryScreen-prop">primaryScreen</a> property. All windows opened in the context of the application should be constrained to the boundaries of the primary screen; for example, it would be inconvenient if a dialog box popped up on a different screen, or split over two screens.</p>
<p class="centerAlign"><img src="images/qdesktopwidget.png" alt="Managing Multiple Screens" /></p><p>In the illustration above, Application One's primary screen is screen 0, and App Two's primary screen is screen 1.</p>
</div>
<p><b>See also </b><a href="qapplication.html">QApplication</a> and <a href="qapplication.html#desktop">QApplication::desktop</a>().</p>
<!-- @@@QDesktopWidget -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$primaryScreen-prop$$$primaryScreen$$$primaryScreenChanged -->
<h3 class="fn" id="primaryScreen-prop"><a name="primaryScreen-prop"></a><span class="name">primaryScreen</span> : const <span class="type">int</span></h3>
<p>This property holds the index of the screen that is configured to be the primary screen on the system.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>primaryScreen</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdesktopwidget.html#primaryScreenChanged">primaryScreenChanged</a></b></span>()</td></tr>
</table></div>
<!-- @@@primaryScreen -->
<!-- $$$screenCount-prop$$$screenCount$$$screenCountChangedint -->
<h3 class="fn" id="screenCount-prop"><a name="screenCount-prop"></a><span class="name">screenCount</span> : const <span class="type">int</span></h3>
<p>This property holds the number of screens currently available on the system.</p>
<p>This property was introduced in  Qt 4.6.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>screenCount</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdesktopwidget.html#screenCountChanged">screenCountChanged</a></b></span>(int <i>newCount</i>)</td></tr>
</table></div>
<!-- @@@screenCount -->
<!-- $$$virtualDesktop-prop$$$isVirtualDesktop -->
<h3 class="fn" id="virtualDesktop-prop"><a name="virtualDesktop-prop"></a><span class="name">virtualDesktop</span> : const <span class="type">bool</span></h3>
<p>if the system manages the available screens in a virtual desktop.</p>
<p>For virtual desktops, <a href="qdesktopwidget.html#screen">screen</a>() will always return the same widget. The size of the virtual desktop is the size of this desktop widget.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isVirtualDesktop</b></span>() const</td></tr>
</table></div>
<!-- @@@virtualDesktop -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$availableGeometry[overload1]$$$availableGeometryint -->
<h3 class="fn" id="availableGeometry"><a name="availableGeometry"></a>const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QDesktopWidget::<span class="name">availableGeometry</span>(<span class="type">int</span> <i>screen</i> = -1) const</h3>
<p>Returns the available geometry of the screen with index <i>screen</i>. What is available will be subrect of <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>() based on what the platform decides is available (for example excludes the dock and menu bar on macOS, or the task bar on Windows). The default screen is used if <i>screen</i> is -1.</p>
<p><b>See also </b><a href="qdesktopwidget.html#screenNumber">screenNumber</a>() and <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>().</p>
<!-- @@@availableGeometry -->
<!-- $$$availableGeometry$$$availableGeometryconstQWidget* -->
<h3 class="fn" id="availableGeometry-1"><a name="availableGeometry-1"></a>const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QDesktopWidget::<span class="name">availableGeometry</span>(const <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the available geometry of the screen which contains <i>widget</i>.</p>
<p><b>See also </b><a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>().</p>
<!-- @@@availableGeometry -->
<!-- $$$availableGeometry$$$availableGeometryconstQPoint& -->
<h3 class="fn" id="availableGeometry-2"><a name="availableGeometry-2"></a>const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QDesktopWidget::<span class="name">availableGeometry</span>(const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &amp;<i>p</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the available geometry of the screen which contains <i>p</i>.</p>
<p><b>See also </b><a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>().</p>
<!-- @@@availableGeometry -->
<!-- $$$primaryScreenChanged -->
<h3 class="fn" id="primaryScreenChanged"><a name="primaryScreenChanged"></a><code>[signal] </code><span class="type">void</span> QDesktopWidget::<span class="name">primaryScreenChanged</span>()</h3>
<p>This signal is emitted whenever the primary screen changes.</p>
<p><b>Note: </b>This doesn't mean the <a href="qdesktopwidget.html#primaryScreen-prop">QDesktopWidget::primaryScreen</a> index will necessarily be different, but now it will refer to the new primary screen.</p><p>This function was introduced in  Qt 5.6.</p>
<p><b>Note:</b> Notifier signal for property <a href="qdesktopwidget.html#primaryScreen-prop">primaryScreen</a>. </p><p><b>See also </b><a href="qdesktopwidget.html#primaryScreen-prop">primaryScreen</a> and <a href="qdesktopwidget.html#screenGeometry">screenGeometry</a>().</p>
<!-- @@@primaryScreenChanged -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn" id="resizeEvent"><a name="resizeEvent"></a><code>[virtual protected] </code><span class="type">void</span> QDesktopWidget::<span class="name">resizeEvent</span>(<span class="type"><a href="../qtgui/qresizeevent.html">QResizeEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$resized[overload1]$$$resizedint -->
<h3 class="fn" id="resized"><a name="resized"></a><code>[signal] </code><span class="type">void</span> QDesktopWidget::<span class="name">resized</span>(<span class="type">int</span> <i>screen</i>)</h3>
<p>This signal is emitted when the size of <i>screen</i> changes.</p>
<!-- @@@resized -->
<!-- $$$screen[overload1]$$$screenint -->
<h3 class="fn" id="screen"><a name="screen"></a><span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *QDesktopWidget::<span class="name">screen</span>(<span class="type">int</span> <i>screen</i> = -1)</h3>
<p>Returns a widget that represents the screen with index <i>screen</i> (a value of -1 means the default screen).</p>
<p>If the system uses a virtual desktop, the returned widget will have the geometry of the entire virtual desktop; i.e&#x2e;, bounding every <i>screen</i>.</p>
<p><b>See also </b><a href="qdesktopwidget.html#primaryScreen-prop">primaryScreen</a>, <a href="qdesktopwidget.html#screenCount-prop">screenCount</a>, and <a href="qdesktopwidget.html#virtualDesktop-prop">virtualDesktop</a>.</p>
<!-- @@@screen -->
<!-- $$$screenCountChanged -->
<h3 class="fn" id="screenCountChanged"><a name="screenCountChanged"></a><code>[signal] </code><span class="type">void</span> QDesktopWidget::<span class="name">screenCountChanged</span>(<span class="type">int</span> <i>newCount</i>)</h3>
<p>This signal is emitted when the number of screens changes to <i>newCount</i>.</p>
<p>This function was introduced in  Qt 4.6.</p>
<p><b>Note:</b> Notifier signal for property <a href="qdesktopwidget.html#screenCount-prop">screenCount</a>. </p><p><b>See also </b><a href="qdesktopwidget.html#screenCount-prop">screenCount</a>.</p>
<!-- @@@screenCountChanged -->
<!-- $$$screenGeometry[overload1]$$$screenGeometryint -->
<h3 class="fn" id="screenGeometry"><a name="screenGeometry"></a>const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QDesktopWidget::<span class="name">screenGeometry</span>(<span class="type">int</span> <i>screen</i> = -1) const</h3>
<p>Returns the geometry of the screen with index <i>screen</i>. The default screen is used if <i>screen</i> is -1.</p>
<p><b>See also </b><a href="qdesktopwidget.html#screenNumber">screenNumber</a>().</p>
<!-- @@@screenGeometry -->
<!-- $$$screenGeometry$$$screenGeometryconstQWidget* -->
<h3 class="fn" id="screenGeometry-1"><a name="screenGeometry-1"></a>const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QDesktopWidget::<span class="name">screenGeometry</span>(const <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the geometry of the screen which contains <i>widget</i>.</p>
<!-- @@@screenGeometry -->
<!-- $$$screenGeometry$$$screenGeometryconstQPoint& -->
<h3 class="fn" id="screenGeometry-2"><a name="screenGeometry-2"></a>const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QDesktopWidget::<span class="name">screenGeometry</span>(const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &amp;<i>p</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the geometry of the screen which contains <i>p</i>.</p>
<!-- @@@screenGeometry -->
<!-- $$$screenNumber[overload1]$$$screenNumberconstQWidget* -->
<h3 class="fn" id="screenNumber"><a name="screenNumber"></a><span class="type">int</span> QDesktopWidget::<span class="name">screenNumber</span>(const <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns the index of the screen that contains the largest part of <i>widget</i>, or -1 if the widget not on a screen.</p>
<p><b>See also </b><a href="qdesktopwidget.html#primaryScreen-prop">primaryScreen</a>.</p>
<!-- @@@screenNumber -->
<!-- $$$screenNumber$$$screenNumberconstQPoint& -->
<h3 class="fn" id="screenNumber-1"><a name="screenNumber-1"></a><span class="type">int</span> QDesktopWidget::<span class="name">screenNumber</span>(const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &amp;<i>point</i>) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the index of the screen that contains the <i>point</i>, or the screen which is the shortest distance from the <i>point</i>.</p>
<p><b>See also </b><a href="qdesktopwidget.html#primaryScreen-prop">primaryScreen</a>.</p>
<!-- @@@screenNumber -->
<!-- $$$workAreaResized[overload1]$$$workAreaResizedint -->
<h3 class="fn" id="workAreaResized"><a name="workAreaResized"></a><code>[signal] </code><span class="type">void</span> QDesktopWidget::<span class="name">workAreaResized</span>(<span class="type">int</span> <i>screen</i>)</h3>
<p>This signal is emitted when the work area available on <i>screen</i> changes.</p>
<!-- @@@workAreaResized -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>