Sophie

Sophie

distrib > Mageia > 6 > armv7hl > by-pkgid > 749fcc421771b410525f39bd88a5732d > files > 146

qttools5-doc-5.9.4-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" />
<!-- designer-manual.qdoc -->
  <title>Qt Designer's Signals and Slots Editing Mode | Qt Designer Manual</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="qtdesigner-manual.html">Qt Designer Manual</a></td><td >Qt Designer's Signals and Slots Editing Mode</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">
  <link rel="prev" href="designer-layouts.html" />
  <link rel="next" href="designer-buddy-mode.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="designer-layouts.html">Using Layouts in Qt Designer</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="designer-buddy-mode.html">Qt Designer's Buddy Editing Mode</a>
</p><p/>
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#connecting-objects">Connecting Objects</a></li>
<li class="level1"><a href="#editing-and-deleting-connections">Editing and Deleting Connections</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Qt Designer's Signals and Slots Editing Mode</h1>
<span class="subtitle"></span>
<!-- $$$designer-connection-mode.html-description -->
<div class="descr"> <a name="details"></a>
<p class="centerAlign"><img src="images/designer-connection-mode.png" alt="" /></p><p>In <i>Qt Designer</i>'s signals and slots editing mode, you can connect objects in a form together using Qt's signals and slots mechanism. Both widgets and layouts can be connected via an intuitive connection interface, using the menu of compatible signals and slots provided by <i>Qt Designer</i>. When a form is saved, all connections are preserved so that they will be ready for use when your project is built.</p>
<p>For more information on Qt's signals and sltos mechanism, refer to the Signals and Slots document.</p>
<a name="connecting-objects"></a>
<h2 id="connecting-objects">Connecting Objects</h2>
<p>To begin connecting objects, enter the signals and slots editing mode by opening the <b>Edit</b> menu and selecting <b>Edit Signals/Slots</b>, or by pressing the <b>F4</b> key.</p>
<p>All widgets and layouts on the form can be connected together. However, spacers just provide spacing hints to layouts, so they cannot be connected to other objects.</p>
<a name="highlightedobjects"></a><div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/designer-connection-highlight.png" alt="" /></td><td ><b>Highlighted Objects</b><p>When the cursor is over an object that can be used in a connection, the object will be highlighted.</p>
</td></tr>
</table></div>
<p>To make a connectionn, press the left mouse button and drag the cursor towards the object you want to connect it to. As you do this, a line will extend from the source object to the cursor. If the cursor is over another object on the form, the line will end with an arrow head that points to the destination object. This indicates that a connection will be made between the two objects when you release the mouse button.</p>
<p>You can abandon the connection at any point while you are dragging the connection path by pressing <b>Esc</b>.</p>
<a name="makingaconnection"></a><div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/designer-connection-making.png" alt="" /></td><td ><b>Making a Connection</b><p>The connection path will change its shape as the cursor moves around the form. As it passes over objects, they are highlighted, indicating that they can be used in a signal and slot connection. Release the mouse button to make the connection.</p>
</td></tr>
</table></div>
<p>The <b>Configure Connection</b> dialog (below) is displayed, showing signals from the source object and slots from the destination object that you can use.</p>
<p class="centerAlign"><img src="images/designer-connection-dialog.png" alt="" /></p><p>To complete the connection, select a signal from the source object and a slot from the destination object, then click <b>OK</b>. Click <b>Cancel</b> if you wish to abandon the connection.</p>
<p><b>Note: </b>If the <b>Show all signals and slots</b> checkbox is selected, all available signals from the source object will be shown. Otherwise, the signals and slots inherited from QWidget will be hidden.</p><p>You can make as many connections as you like between objects on the form; it is possible to connect signals from objects to slots in the form itself. As a result, the signal and slot connections in many dialogs can be completely configured from within <i>Qt Designer</i>.</p>
<a name="connectingtotheform"></a><div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/designer-connection-to-form.png" alt="" /></td><td ><b>Connecting to a Form</b><p>To connect an object to the form itself, simply position the cursor over the form and release the mouse button. The end point of the connection changes to the electrical &quot;ground&quot; symbol.</p>
</td></tr>
</table></div>
<a name="editing-and-deleting-connections"></a>
<h2 id="editing-and-deleting-connections">Editing and Deleting Connections</h2>
<p>By default, connection paths are created with two labels that show the signal and slot involved in the connection. These labels are usually oriented along the line of the connection. You can move them around inside their host widgets by dragging the red square at each end of the connection path.</p>
<a name="connectioneditor"></a><div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/designer-connection-editor.png" alt="" /></td><td ><b>The Signal/Slot Editor</b><p>The signal and slot used in a connection can be changed after it has been set up. When a connection is configured, it becomes visible in <i>Qt Designer</i>'s signal and slot editor where it can be further edited. You can also edit signal/slot connections by double-clicking on the connection path or one of its labels to display the Connection Dialog.</p>
</td></tr>
</table></div>
<a name="deletingconnections"></a><div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><img src="images/designer-connection-editing.png" alt="" /></td><td ><b>Deleting Connections</b><p>The whole connection can be selected by clicking on any of its path segments. Once selected, a connection can be deleted with the <b>Delete</b> key, ensuring that it will not be set up in the UI file.</p>
</td></tr>
</table></div>
</div>
<!-- @@@designer-connection-mode.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="designer-layouts.html">Using Layouts in Qt Designer</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="designer-buddy-mode.html">Qt Designer's Buddy Editing Mode</a>
</p>
        </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>