Sophie

Sophie

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

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" />
<!-- qtplatformheaders.qdoc -->
  <title>Qt Platform Headers 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 >Qt Platform Headers</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="#getting-started">Getting Started</a></li>
<li class="level1"><a href="#api-reference">API Reference</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Qt Platform Headers</h1>
<span class="subtitle"></span>
<!-- $$$qtplatformheaders-index.html-description -->
<div class="descr"> <a name="details"></a>
<p>Some applications may need to interface Qt with other frameworks. This often means using graphics contexts or other types of native handles created by one framework with another. For example, on some platforms, <a href="../qtgui/qopenglcontext.html">QOpenGLContext</a> offers the ability to wrap an existing native OpenGL context, instead of creating a new one. This existing native context can be created by some other third-party code.</p>
<p>The type of such native handles is highly platform specific and in some cases the platform plugin will need more information to adopt a handle, just the handle in itself will not be sufficient. Therefore the public API consists of functions taking or returning a <a href="../qtcore/qvariant.html">QVariant</a> that contains a platform-specific value type. See for example <a href="../qtgui/qopenglcontext.html#setNativeHandle">QOpenGLContext::setNativeHandle</a>() and <a href="../qtgui/qopenglcontext.html#nativeHandle">QOpenGLContext::nativeHandle</a>(). When running on Linux/X11, using the xcb platform plugin and the GLX windowing system interface, the variant contains a <a href="qglxnativecontext.html">QGLXNativeContext</a>. On other platforms a different class will be used. These classes are all placed in the Qt Platform Headers module.</p>
<p>Platform headers can be used in conjunction with <a href="../qtgui/qguiapplication.html#platformFunction">QGuiApplication::platformFunction</a>() to give a type safe interface to platform specific functionality. It is possible for headers defined in <a href="qtplatformheaders-module.html">QtPlatformHeaders</a> to define typedefs for functions that can be returned by a platform plugin from <a href="../qtgui/qguiapplication.html#platformFunction">QGuiApplication::platformFunction</a>(). Headers in <a href="qtplatformheaders-module.html">QtPlatformHeaders</a> can also implement wrapper functions for the function pointer, giving a static function that can be called from any context after the platform integration has been created. An implementation of this pattern is <a href="qxcbwindowfunctions.html#setWmWindowType">QXcbWindowFunctions::setWmWindowType</a>(). This function retrieves a function pointer from <a href="../qtgui/qguiapplication.html#platformFunction">QGuiApplication::platformFunction</a>, and executes that function if the requested function was returned.</p>
<p><b>Note: </b>Similar to the other QPA APIs, there are no binary compatibility guarantees for these classes, meaning that an application using these classes is only guaranteed to work with the Qt version it was developed against. Unlike QPA however, source compatibility is guaranteed.</p><a name="getting-started"></a>
<h2 id="getting-started">Getting Started</h2>
<p>To include the definitions of the module's functions and classes, use the following directives:</p>
<pre class="cpp">

  <span class="preprocessor">#include &lt;QtPlatformHeaders/QWindowsWindowFunctions&gt;</span>
  <span class="preprocessor">#include &lt;QtPlatformHeaders/QXcbWindowFunctions&gt;</span>

</pre>
<p>As the module is header-only, no further modifications to the .pro files are required to use it.</p>
<p><b>Note: </b>The module name (<code>QtPlatformHeaders</code>) must appear in the <code>#include</code> directive.</p><p><b>Note: </b>It is not necessary to enclose the code in <code>#ifdef</code> directives depending on platform.</p><a name="api-reference"></a>
<h2 id="api-reference">API Reference</h2>
<ul>
<li><a href="qtplatformheaders-module.html">C++ Classes</a></li>
</ul>
</div>
<p><b>See also </b><a href="qxcbwindowfunctions.html">QXcbWindowFunctions</a> and <a href="qwindowswindowfunctions.html">QWindowsWindowFunctions</a>.</p>
<!-- @@@qtplatformheaders-index.html -->
        </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>