Sophie

Sophie

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

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" />
<!-- qkeysequence.cpp -->
  <title>QKeySequence Class | Qt GUI 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="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QKeySequence</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="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#standard-shortcuts">Standard Shortcuts</a></li>
<li class="level2"><a href="#keyboard-layout-issues">Keyboard Layout Issues</a></li>
<li class="level2"><a href="#gnu-emacs-style-key-sequences">GNU Emacs Style Key Sequences</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QKeySequence Class</h1>
<!-- $$$QKeySequence-brief -->
<p>The <a href="qkeysequence.html">QKeySequence</a> class encapsulates a key sequence as used by shortcuts. <a href="#details">More...</a></p>
<!-- @@@QKeySequence -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QKeySequence&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr></table></div><ul>
<li><a href="qkeysequence-members.html">List of all members, including inherited members</a></li>
<li><a href="qkeysequence-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#SequenceFormat-enum">SequenceFormat</a></b> { NativeText, PortableText }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#SequenceMatch-enum">SequenceMatch</a></b> { NoMatch, PartialMatch, ExactMatch }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#StandardKey-enum">StandardKey</a></b> { AddTab, Back, Backspace, Bold, ..., Cancel }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#QKeySequence">QKeySequence</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#QKeySequence-1">QKeySequence</a></b>(const QString &amp;<i>key</i>, SequenceFormat <i>format</i> = NativeText)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#QKeySequence-2">QKeySequence</a></b>(int <i>k1</i>, int <i>k2</i> = 0, int <i>k3</i> = 0, int <i>k4</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#QKeySequence-3">QKeySequence</a></b>(const QKeySequence &amp;<i>keysequence</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#QKeySequence-4">QKeySequence</a></b>(StandardKey <i>key</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#dtor.QKeySequence">~QKeySequence</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#count">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#isEmpty">isEmpty</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> SequenceMatch </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#matches">matches</a></b>(const QKeySequence &amp;<i>seq</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#swap">swap</a></b>(QKeySequence &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#toString">toString</a></b>(SequenceFormat <i>format</i> = PortableText) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-QVariant">operator QVariant</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-not-eq">operator!=</a></b>(const QKeySequence &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-lt">operator&lt;</a></b>(const QKeySequence &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-lt-eq">operator&lt;=</a></b>(const QKeySequence &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QKeySequence &amp;</td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-eq">operator=</a></b>(const QKeySequence &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QKeySequence &amp;</td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-eq-1">operator=</a></b>(QKeySequence &amp;&amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-eq-eq">operator==</a></b>(const QKeySequence &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-gt">operator&gt;</a></b>(const QKeySequence &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-gt-eq">operator&gt;=</a></b>(const QKeySequence &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-5b-5d">operator[]</a></b>(uint <i>index</i>) const</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QKeySequence </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#fromString">fromString</a></b>(const QString &amp;<i>str</i>, SequenceFormat <i>format</i> = PortableText)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QKeySequence&gt; </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#keyBindings">keyBindings</a></b>(StandardKey <i>key</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QKeySequence&gt; </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#listFromString">listFromString</a></b>(const QString &amp;<i>str</i>, SequenceFormat <i>format</i> = PortableText)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#listToString">listToString</a></b>(const QList&lt;QKeySequence&gt; &amp;<i>list</i>, SequenceFormat <i>format</i> = PortableText)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QKeySequence </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#mnemonic">mnemonic</a></b>(const QString &amp;<i>text</i>)</td></tr>
</table></div>
<a name="related-non-members"></a>
<h2 id="related-non-members">Related Non-Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#qt_set_sequence_auto_mnemonic">qt_set_sequence_auto_mnemonic</a></b>(bool <i>b</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp;</td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-lt-lt">operator&lt;&lt;</a></b>(QDataStream &amp;<i>stream</i>, const QKeySequence &amp;<i>sequence</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp;</td><td class="memItemRight bottomAlign"><b><a href="qkeysequence.html#operator-gt-gt">operator&gt;&gt;</a></b>(QDataStream &amp;<i>stream</i>, QKeySequence &amp;<i>sequence</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QKeySequence-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qkeysequence.html">QKeySequence</a> class encapsulates a key sequence as used by shortcuts.</p>
<p>In its most common form, a key sequence describes a combination of keys that must be used together to perform some action. Key sequences are used with <a href="../qtwidgets/qaction.html">QAction</a> objects to specify which keyboard shortcuts can be used to trigger actions.</p>
<p>Key sequences can be constructed for use as keyboard shortcuts in three different ways:</p>
<ul>
<li>For standard shortcuts, a <a href="qkeysequence.html#StandardKey-enum">standard key</a> can be used to request the platform-specific key sequence associated with each shortcut.</li>
<li>For custom shortcuts, human-readable strings such as &quot;Ctrl+X&quot; can be used, and these can be translated into the appropriate shortcuts for users of different languages. Translations are made in the &quot;<a href="../qtwidgets/qshortcut.html">QShortcut</a>&quot; context.</li>
<li>For hard-coded shortcuts, integer key codes can be specified with a combination of values defined by the <a href="../qtcore/qt.html#Key-enum">Qt::Key</a> and <a href="../qtcore/qt.html#Modifier-enum">Qt::Modifier</a> enum values. Each key code consists of a single <a href="../qtcore/qt.html#Key-enum">Qt::Key</a> value and zero or more modifiers, such as <a href="../qtcore/qt.html#Modifier-enum">Qt::SHIFT</a>, <a href="../qtcore/qt.html#Modifier-enum">Qt::CTRL</a>, <a href="../qtcore/qt.html#Modifier-enum">Qt::ALT</a> and <a href="../qtcore/qt.html#Modifier-enum">Qt::META</a>.</li>
</ul>
<p>For example, <b>Ctrl P</b> might be a sequence used as a shortcut for printing a document, and can be specified in any of the following ways:</p>
<pre class="cpp">

  <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>(<span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span><span class="operator">::</span>Print);
  <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>(tr(<span class="string">&quot;Ctrl+P&quot;</span>));
  <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>(tr(<span class="string">&quot;Ctrl+p&quot;</span>));
  <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>(<span class="type">Qt</span><span class="operator">::</span>CTRL <span class="operator">+</span> <span class="type">Qt</span><span class="operator">::</span>Key_P);

</pre>
<p>Note that, for letters, the case used in the specification string does not matter. In the above examples, the user does not need to hold down the <b>Shift</b> key to activate a shortcut specified with &quot;Ctrl+P&quot;. However, for other keys, the use of <b>Shift</b> as an unspecified extra modifier key can lead to confusion for users of an application whose keyboards have different layouts to those used by the developers. See the <a href="qkeysequence.html#keyboard-layout-issues">Keyboard Layout Issues</a> section below for more details.</p>
<p>It is preferable to use standard shortcuts where possible. When creating key sequences for non-standard shortcuts, you should use human-readable strings in preference to hard-coded integer values.</p>
<p><a href="qkeysequence.html">QKeySequence</a> objects can be cast to a <a href="../qtcore/qstring.html">QString</a> to obtain a human-readable translated version of the sequence. Similarly, the <a href="qkeysequence.html#toString">toString</a>() function produces human-readable strings for use in menus. On macOS, the appropriate symbols are used to describe keyboard shortcuts using special keys on the Macintosh keyboard.</p>
<p>An alternative way to specify hard-coded key codes is to use the Unicode code point of the character; for example, 'A' gives the same key sequence as <a href="../qtcore/qt.html#Key-enum">Qt::Key_A</a>.</p>
<p><b>Note: </b>On macOS, references to &quot;Ctrl&quot;, <a href="../qtcore/qt.html#Modifier-enum">Qt::CTRL</a>, <a href="../qtcore/qt.html#Key-enum">Qt::Key_Control</a> and <a href="../qtcore/qt.html#KeyboardModifier-enum">Qt::ControlModifier</a> correspond to the <b>Command</b> keys on the Macintosh keyboard, and references to &quot;Meta&quot;, <a href="../qtcore/qt.html#Modifier-enum">Qt::META</a>, <a href="../qtcore/qt.html#Key-enum">Qt::Key_Meta</a> and <a href="../qtcore/qt.html#KeyboardModifier-enum">Qt::MetaModifier</a> correspond to the <b>Control</b> keys. Developers on macOS can use the same shortcut descriptions across all platforms, and their applications will automatically work as expected on macOS.</p><a name="standard-shortcuts"></a>
<h3 >Standard Shortcuts</h3>
<p><a href="qkeysequence.html">QKeySequence</a> defines many <a href="qkeysequence.html#StandardKey-enum">standard keyboard shortcuts</a> to reduce the amount of effort required when setting up actions in a typical application. The table below shows some common key sequences that are often used for these standard shortcuts by applications on four widely-used platforms. Note that on macOS, the <b>Ctrl</b> value corresponds to the <b>Command</b> keys on the Macintosh keyboard, and the <b>Meta</b> value corresponds to the <b>Control</b> keys.</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th ><a href="qkeysequence.html#StandardKey-enum">StandardKey</a></th><th >Windows</th><th >macOS</th><th >KDE</th><th >GNOME</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">HelpContents</a></td><td >F1</td><td >Ctrl+?</td><td >F1</td><td >F1</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">WhatsThis</a></td><td >Shift+F1</td><td >Shift+F1</td><td >Shift+F1</td><td >Shift+F1</td></tr>
<tr valign="top" class="odd"><td >Open</td><td >Ctrl+O</td><td >Ctrl+O</td><td >Ctrl+O</td><td >Ctrl+O</td></tr>
<tr valign="top" class="even"><td >Close</td><td >Ctrl+F4, Ctrl+W</td><td >Ctrl+W, Ctrl+F4</td><td >Ctrl+W</td><td >Ctrl+W</td></tr>
<tr valign="top" class="odd"><td >Save</td><td >Ctrl+S</td><td >Ctrl+S</td><td >Ctrl+S</td><td >Ctrl+S</td></tr>
<tr valign="top" class="even"><td >Quit</td><td ></td><td >Ctrl+Q</td><td >Ctrl+Q</td><td >Ctrl+Q</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">SaveAs</a></td><td ></td><td >Ctrl+Shift+S</td><td ></td><td >Ctrl+Shift+S</td></tr>
<tr valign="top" class="even"><td >New</td><td >Ctrl+N</td><td >Ctrl+N</td><td >Ctrl+N</td><td >Ctrl+N</td></tr>
<tr valign="top" class="odd"><td >Delete</td><td >Del</td><td >Del, Meta+D</td><td >Del, Ctrl+D</td><td >Del, Ctrl+D</td></tr>
<tr valign="top" class="even"><td >Cut</td><td >Ctrl+X, Shift+Del</td><td >Ctrl+X, Meta+K</td><td >Ctrl+X, F20, Shift+Del</td><td >Ctrl+X, F20, Shift+Del</td></tr>
<tr valign="top" class="odd"><td >Copy</td><td >Ctrl+C, Ctrl+Ins</td><td >Ctrl+C</td><td >Ctrl+C, F16, Ctrl+Ins</td><td >Ctrl+C, F16, Ctrl+Ins</td></tr>
<tr valign="top" class="even"><td >Paste</td><td >Ctrl+V, Shift+Ins</td><td >Ctrl+V, Meta+Y</td><td >Ctrl+V, F18, Shift+Ins</td><td >Ctrl+V, F18, Shift+Ins</td></tr>
<tr valign="top" class="odd"><td >Preferences</td><td ></td><td >Ctrl+,</td><td ></td><td ></td></tr>
<tr valign="top" class="even"><td >Undo</td><td >Ctrl+Z, Alt+Backspace</td><td >Ctrl+Z</td><td >Ctrl+Z, F14</td><td >Ctrl+Z, F14</td></tr>
<tr valign="top" class="odd"><td >Redo</td><td >Ctrl+Y, Shift+Ctrl+Z, Alt+Shift+Backspace</td><td >Ctrl+Shift+Z</td><td >Ctrl+Shift+Z</td><td >Ctrl+Shift+Z</td></tr>
<tr valign="top" class="even"><td >Back</td><td >Alt+Left, Backspace</td><td >Ctrl+[</td><td >Alt+Left</td><td >Alt+Left</td></tr>
<tr valign="top" class="odd"><td >Forward</td><td >Alt+Right, Shift+Backspace</td><td >Ctrl+]</td><td >Alt+Right</td><td >Alt+Right</td></tr>
<tr valign="top" class="even"><td >Refresh</td><td >F5</td><td >F5</td><td >F5</td><td >Ctrl+R, F5</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">ZoomIn</a></td><td >Ctrl+Plus</td><td >Ctrl+Plus</td><td >Ctrl+Plus</td><td >Ctrl+Plus</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">ZoomOut</a></td><td >Ctrl+Minus</td><td >Ctrl+Minus</td><td >Ctrl+Minus</td><td >Ctrl+Minus</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">FullScreen</a></td><td >F11, Alt+Enter</td><td >Ctrl+Meta+F</td><td >F11, Ctrl+Shift+F</td><td >Ctrl+F11</td></tr>
<tr valign="top" class="even"><td >Print</td><td >Ctrl+P</td><td >Ctrl+P</td><td >Ctrl+P</td><td >Ctrl+P</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">AddTab</a></td><td >Ctrl+T</td><td >Ctrl+T</td><td >Ctrl+Shift+N, Ctrl+T</td><td >Ctrl+T</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">NextChild</a></td><td >Ctrl+Tab, Forward, Ctrl+F6</td><td >Ctrl+}, Forward, Ctrl+Tab</td><td >Ctrl+Tab, Forward, Ctrl+Comma</td><td >Ctrl+Tab, Forward</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">PreviousChild</a></td><td >Ctrl+Shift+Tab, Back, Ctrl+Shift+F6</td><td >Ctrl+{, Back, Ctrl+Shift+Tab</td><td >Ctrl+Shift+Tab, Back, Ctrl+Period</td><td >Ctrl+Shift+Tab, Back</td></tr>
<tr valign="top" class="even"><td >Find</td><td >Ctrl+F</td><td >Ctrl+F</td><td >Ctrl+F</td><td >Ctrl+F</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">FindNext</a></td><td >F3, Ctrl+G</td><td >Ctrl+G</td><td >F3</td><td >Ctrl+G, F3</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">FindPrevious</a></td><td >Shift+F3, Ctrl+Shift+G</td><td >Ctrl+Shift+G</td><td >Shift+F3</td><td >Ctrl+Shift+G, Shift+F3</td></tr>
<tr valign="top" class="odd"><td >Replace</td><td >Ctrl+H</td><td >(none)</td><td >Ctrl+R</td><td >Ctrl+H</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">SelectAll</a></td><td >Ctrl+A</td><td >Ctrl+A</td><td >Ctrl+A</td><td >Ctrl+A</td></tr>
<tr valign="top" class="odd"><td >Deselect</td><td ></td><td ></td><td >Ctrl+Shift+A</td><td >Ctrl+Shift+A</td></tr>
<tr valign="top" class="even"><td >Bold</td><td >Ctrl+B</td><td >Ctrl+B</td><td >Ctrl+B</td><td >Ctrl+B</td></tr>
<tr valign="top" class="odd"><td >Italic</td><td >Ctrl+I</td><td >Ctrl+I</td><td >Ctrl+I</td><td >Ctrl+I</td></tr>
<tr valign="top" class="even"><td >Underline</td><td >Ctrl+U</td><td >Ctrl+U</td><td >Ctrl+U</td><td >Ctrl+U</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToNextChar</a></td><td >Right</td><td >Right, Meta+F</td><td >Right</td><td >Right</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToPreviousChar</a></td><td >Left</td><td >Left, Meta+B</td><td >Left</td><td >Left</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToNextWord</a></td><td >Ctrl+Right</td><td >Alt+Right</td><td >Ctrl+Right</td><td >Ctrl+Right</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToPreviousWord</a></td><td >Ctrl+Left</td><td >Alt+Left</td><td >Ctrl+Left</td><td >Ctrl+Left</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToNextLine</a></td><td >Down</td><td >Down, Meta+N</td><td >Down</td><td >Down</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToPreviousLine</a></td><td >Up</td><td >Up, Meta+P</td><td >Up</td><td >Up</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToNextPage</a></td><td >PgDown</td><td >PgDown, Alt+PgDown, Meta+Down, Meta+PgDown, Meta+V</td><td >PgDown</td><td >PgDown</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToPreviousPage</a></td><td >PgUp</td><td >PgUp, Alt+PgUp, Meta+Up, Meta+PgUp</td><td >PgUp</td><td >PgUp</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToStartOfLine</a></td><td >Home</td><td >Ctrl+Left, Meta+Left</td><td >Home</td><td >Home</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToEndOfLine</a></td><td >End</td><td >Ctrl+Right, Meta+Right</td><td >End, Ctrl+E</td><td >End, Ctrl+E</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToStartOfBlock</a></td><td >(none)</td><td >Alt+Up, Meta+A</td><td >(none)</td><td >(none)</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToEndOfBlock</a></td><td >(none)</td><td >Alt+Down, Meta+E</td><td >(none)</td><td >(none)</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToStartOfDocument</a></td><td >Ctrl+Home</td><td >Ctrl+Up, Home</td><td >Ctrl+Home</td><td >Ctrl+Home</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">MoveToEndOfDocument</a></td><td >Ctrl+End</td><td >Ctrl+Down, End</td><td >Ctrl+End</td><td >Ctrl+End</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">SelectNextChar</a></td><td >Shift+Right</td><td >Shift+Right</td><td >Shift+Right</td><td >Shift+Right</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">SelectPreviousChar</a></td><td >Shift+Left</td><td >Shift+Left</td><td >Shift+Left</td><td >Shift+Left</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">SelectNextWord</a></td><td >Ctrl+Shift+Right</td><td >Alt+Shift+Right</td><td >Ctrl+Shift+Right</td><td >Ctrl+Shift+Right</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">SelectPreviousWord</a></td><td >Ctrl+Shift+Left</td><td >Alt+Shift+Left</td><td >Ctrl+Shift+Left</td><td >Ctrl+Shift+Left</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">SelectNextLine</a></td><td >Shift+Down</td><td >Shift+Down</td><td >Shift+Down</td><td >Shift+Down</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">SelectPreviousLine</a></td><td >Shift+Up</td><td >Shift+Up</td><td >Shift+Up</td><td >Shift+Up</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">SelectNextPage</a></td><td >Shift+PgDown</td><td >Shift+PgDown</td><td >Shift+PgDown</td><td >Shift+PgDown</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">SelectPreviousPage</a></td><td >Shift+PgUp</td><td >Shift+PgUp</td><td >Shift+PgUp</td><td >Shift+PgUp</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">SelectStartOfLine</a></td><td >Shift+Home</td><td >Ctrl+Shift+Left</td><td >Shift+Home</td><td >Shift+Home</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">SelectEndOfLine</a></td><td >Shift+End</td><td >Ctrl+Shift+Right</td><td >Shift+End</td><td >Shift+End</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">SelectStartOfBlock</a></td><td >(none)</td><td >Alt+Shift+Up, Meta+Shift+A</td><td >(none)</td><td >(none)</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">SelectEndOfBlock</a></td><td >(none)</td><td >Alt+Shift+Down, Meta+Shift+E</td><td >(none)</td><td >(none)</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">SelectStartOfDocument</a></td><td >Ctrl+Shift+Home</td><td >Ctrl+Shift+Up, Shift+Home</td><td >Ctrl+Shift+Home</td><td >Ctrl+Shift+Home</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">SelectEndOfDocument</a></td><td >Ctrl+Shift+End</td><td >Ctrl+Shift+Down, Shift+End</td><td >Ctrl+Shift+End</td><td >Ctrl+Shift+End</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">DeleteStartOfWord</a></td><td >Ctrl+Backspace</td><td >Alt+Backspace</td><td >Ctrl+Backspace</td><td >Ctrl+Backspace</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">DeleteEndOfWord</a></td><td >Ctrl+Del</td><td >(none)</td><td >Ctrl+Del</td><td >Ctrl+Del</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">DeleteEndOfLine</a></td><td >(none)</td><td >(none)</td><td >Ctrl+K</td><td >Ctrl+K</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">DeleteCompleteLine</a></td><td >(none)</td><td >(none)</td><td >Ctrl+U</td><td >Ctrl+U</td></tr>
<tr valign="top" class="odd"><td ><a href="qkeysequence.html#StandardKey-enum">InsertParagraphSeparator</a></td><td >Enter</td><td >Enter</td><td >Enter</td><td >Enter</td></tr>
<tr valign="top" class="even"><td ><a href="qkeysequence.html#StandardKey-enum">InsertLineSeparator</a></td><td >Shift+Enter</td><td >Meta+Enter, Meta+O</td><td >Shift+Enter</td><td >Shift+Enter</td></tr>
<tr valign="top" class="odd"><td >Backspace</td><td >(none)</td><td >Meta+H</td><td >(none)</td><td >(none)</td></tr>
<tr valign="top" class="even"><td >Cancel</td><td >Escape</td><td >Escape, Ctrl+.</td><td >Escape</td><td >Escape</td></tr>
</table></div>
<p>Note that, since the key sequences used for the standard shortcuts differ between platforms, you still need to test your shortcuts on each platform to ensure that you do not unintentionally assign the same key sequence to many actions.</p>
<a name="keyboard-layout-issues"></a>
<h3 >Keyboard Layout Issues</h3>
<p>Many key sequence specifications are chosen by developers based on the layout of certain types of keyboard, rather than choosing keys that represent the first letter of an action's name, such as <b>Ctrl S</b> (&quot;Ctrl+S&quot;) or <b>Ctrl C</b> (&quot;Ctrl+C&quot;). Additionally, because certain symbols can only be entered with the help of modifier keys on certain keyboard layouts, key sequences intended for use with one keyboard layout may map to a different key, map to no keys at all, or require an additional modifier key to be used on different keyboard layouts.</p>
<p>For example, the shortcuts, <b>Ctrl plus</b> and <b>Ctrl minus</b>, are often used as shortcuts for zoom operations in graphics applications, and these may be specified as &quot;Ctrl++&quot; and &quot;Ctrl+-&quot; respectively. However, the way these shortcuts are specified and interpreted depends on the keyboard layout. Users of Norwegian keyboards will note that the <b>+</b> and <b>-</b> keys are not adjacent on the keyboard, but will still be able to activate both shortcuts without needing to press the <b>Shift</b> key. However, users with British keyboards will need to hold down the <b>Shift</b> key to enter the <b>+</b> symbol, making the shortcut effectively the same as &quot;Ctrl+Shift+=&quot;.</p>
<p>Although some developers might resort to fully specifying all the modifiers they use on their keyboards to activate a shortcut, this will also result in unexpected behavior for users of different keyboard layouts.</p>
<p>For example, a developer using a British keyboard may decide to specify &quot;Ctrl+Shift+=&quot; as the key sequence in order to create a shortcut that coincidentally behaves in the same way as <b>Ctrl plus</b>. However, the <b>=</b> key needs to be accessed using the <b>Shift</b> key on Norwegian keyboard, making the required shortcut effectively <b>Ctrl Shift Shift =</b> (an impossible key combination).</p>
<p>As a result, both human-readable strings and hard-coded key codes can both be problematic to use when specifying a key sequence that can be used on a variety of different keyboard layouts. Only the use of <a href="qkeysequence.html#StandardKey-enum">standard shortcuts</a> guarantees that the user will be able to use the shortcuts that the developer intended.</p>
<p>Despite this, we can address this issue by ensuring that human-readable strings are used, making it possible for translations of key sequences to be made for users of different languages. This approach will be successful for users whose keyboards have the most typical layout for the language they are using.</p>
<a name="gnu-emacs-style-key-sequences"></a>
<h3 >GNU Emacs Style Key Sequences</h3>
<p>Key sequences similar to those used in <a href="http://www.gnu.org/software/emacs/">GNU Emacs</a>, allowing up to four key codes, can be created by using the multiple argument constructor, or by passing a human-readable string of comma-separated key sequences.</p>
<p>For example, the key sequence, <b>Ctrl X</b> followed by <b>Ctrl C</b>, can be specified using either of the following ways:</p>
<pre class="cpp">

  <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>(tr(<span class="string">&quot;Ctrl+X, Ctrl+C&quot;</span>));
  <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>(<span class="type">Qt</span><span class="operator">::</span>CTRL <span class="operator">+</span> <span class="type">Qt</span><span class="operator">::</span>Key_X<span class="operator">,</span> <span class="type">Qt</span><span class="operator">::</span>CTRL <span class="operator">+</span> <span class="type">Qt</span><span class="operator">::</span>Key_C);

</pre>
<p><b>Warning:</b> A <a href="../qtwidgets/qapplication.html">QApplication</a> instance must have been constructed before a <a href="qkeysequence.html">QKeySequence</a> is created; otherwise, your application may crash.</p>
</div>
<p><b>See also </b><a href="../qtwidgets/qshortcut.html">QShortcut</a>.</p>
<!-- @@@QKeySequence -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$SequenceFormat$$$NativeText$$$PortableText -->
<h3 class="fn" id="SequenceFormat-enum"><a name="SequenceFormat-enum"></a>enum QKeySequence::<span class="name">SequenceFormat</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QKeySequence::NativeText</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The key sequence as a platform specific string. This means that it will be shown translated and on the Mac it will resemble a key sequence from the menu bar. This enum is best used when you want to display the string to the user.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::PortableText</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The key sequence is given in a &quot;portable&quot; format, suitable for reading and writing to a file. In many cases, it will look similar to the native text on Windows and X11.</td></tr>
</table></div>
<!-- @@@SequenceFormat -->
<!-- $$$SequenceMatch$$$NoMatch$$$PartialMatch$$$ExactMatch -->
<h3 class="fn" id="SequenceMatch-enum"><a name="SequenceMatch-enum"></a>enum QKeySequence::<span class="name">SequenceMatch</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QKeySequence::NoMatch</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The key sequences are different; not even partially matching.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::PartialMatch</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The key sequences match partially, but are not the same.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::ExactMatch</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The key sequences are the same.</td></tr>
</table></div>
<!-- @@@SequenceMatch -->
<!-- $$$StandardKey$$$UnknownKey$$$HelpContents$$$WhatsThis$$$Open$$$Close$$$Save$$$New$$$Delete$$$Cut$$$Copy$$$Paste$$$Undo$$$Redo$$$Back$$$Forward$$$Refresh$$$ZoomIn$$$ZoomOut$$$Print$$$AddTab$$$NextChild$$$PreviousChild$$$Find$$$FindNext$$$FindPrevious$$$Replace$$$SelectAll$$$Bold$$$Italic$$$Underline$$$MoveToNextChar$$$MoveToPreviousChar$$$MoveToNextWord$$$MoveToPreviousWord$$$MoveToNextLine$$$MoveToPreviousLine$$$MoveToNextPage$$$MoveToPreviousPage$$$MoveToStartOfLine$$$MoveToEndOfLine$$$MoveToStartOfBlock$$$MoveToEndOfBlock$$$MoveToStartOfDocument$$$MoveToEndOfDocument$$$SelectNextChar$$$SelectPreviousChar$$$SelectNextWord$$$SelectPreviousWord$$$SelectNextLine$$$SelectPreviousLine$$$SelectNextPage$$$SelectPreviousPage$$$SelectStartOfLine$$$SelectEndOfLine$$$SelectStartOfBlock$$$SelectEndOfBlock$$$SelectStartOfDocument$$$SelectEndOfDocument$$$DeleteStartOfWord$$$DeleteEndOfWord$$$DeleteEndOfLine$$$InsertParagraphSeparator$$$InsertLineSeparator$$$SaveAs$$$Preferences$$$Quit$$$FullScreen$$$Deselect$$$DeleteCompleteLine$$$Backspace$$$Cancel -->
<h3 class="fn" id="StandardKey-enum"><a name="StandardKey-enum"></a>enum QKeySequence::<span class="name">StandardKey</span></h3>
<p>This enum represent standard key bindings. They can be used to assign platform dependent keyboard shortcuts to a <a href="../qtwidgets/qaction.html">QAction</a>.</p>
<p>Note that the key bindings are platform dependent. The currently bound shortcuts can be queried using <a href="qkeysequence.html#keyBindings">keyBindings</a>().</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QKeySequence::AddTab</code></td><td class="topAlign tblval"><code>19</code></td><td class="topAlign">Add new tab.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Back</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">Navigate back.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Backspace</code></td><td class="topAlign tblval"><code>69</code></td><td class="topAlign">Delete previous character.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Bold</code></td><td class="topAlign tblval"><code>27</code></td><td class="topAlign">Bold text.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Close</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Close document/tab.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Copy</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">Copy.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Cut</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Cut.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Delete</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">Delete.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::DeleteEndOfLine</code></td><td class="topAlign tblval"><code>60</code></td><td class="topAlign">Delete end of line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::DeleteEndOfWord</code></td><td class="topAlign tblval"><code>59</code></td><td class="topAlign">Delete word from the end of the cursor.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::DeleteStartOfWord</code></td><td class="topAlign tblval"><code>58</code></td><td class="topAlign">Delete the beginning of a word up to the cursor.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::DeleteCompleteLine</code></td><td class="topAlign tblval"><code>68</code></td><td class="topAlign">Delete the entire line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Find</code></td><td class="topAlign tblval"><code>22</code></td><td class="topAlign">Find in document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::FindNext</code></td><td class="topAlign tblval"><code>23</code></td><td class="topAlign">Find next result.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::FindPrevious</code></td><td class="topAlign tblval"><code>24</code></td><td class="topAlign">Find previous result.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Forward</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">Navigate forward.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::HelpContents</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Open help contents.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::InsertLineSeparator</code></td><td class="topAlign tblval"><code>62</code></td><td class="topAlign">Insert a new line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::InsertParagraphSeparator</code></td><td class="topAlign tblval"><code>61</code></td><td class="topAlign">Insert a new paragraph.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Italic</code></td><td class="topAlign tblval"><code>28</code></td><td class="topAlign">Italic text.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToEndOfBlock</code></td><td class="topAlign tblval"><code>41</code></td><td class="topAlign">Move cursor to end of block. This shortcut is only used on the macOS.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToEndOfDocument</code></td><td class="topAlign tblval"><code>43</code></td><td class="topAlign">Move cursor to end of document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToEndOfLine</code></td><td class="topAlign tblval"><code>39</code></td><td class="topAlign">Move cursor to end of line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToNextChar</code></td><td class="topAlign tblval"><code>30</code></td><td class="topAlign">Move cursor to next character.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToNextLine</code></td><td class="topAlign tblval"><code>34</code></td><td class="topAlign">Move cursor to next line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToNextPage</code></td><td class="topAlign tblval"><code>36</code></td><td class="topAlign">Move cursor to next page.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToNextWord</code></td><td class="topAlign tblval"><code>32</code></td><td class="topAlign">Move cursor to next word.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToPreviousChar</code></td><td class="topAlign tblval"><code>31</code></td><td class="topAlign">Move cursor to previous character.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToPreviousLine</code></td><td class="topAlign tblval"><code>35</code></td><td class="topAlign">Move cursor to previous line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToPreviousPage</code></td><td class="topAlign tblval"><code>37</code></td><td class="topAlign">Move cursor to previous page.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToPreviousWord</code></td><td class="topAlign tblval"><code>33</code></td><td class="topAlign">Move cursor to previous word.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToStartOfBlock</code></td><td class="topAlign tblval"><code>40</code></td><td class="topAlign">Move cursor to start of a block. This shortcut is only used on macOS.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToStartOfDocument</code></td><td class="topAlign tblval"><code>42</code></td><td class="topAlign">Move cursor to start of document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::MoveToStartOfLine</code></td><td class="topAlign tblval"><code>38</code></td><td class="topAlign">Move cursor to start of line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::New</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Create new document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::NextChild</code></td><td class="topAlign tblval"><code>20</code></td><td class="topAlign">Navigate to next tab or child window.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Open</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Open document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Paste</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">Paste.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Preferences</code></td><td class="topAlign tblval"><code>64</code></td><td class="topAlign">Open the preferences dialog.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::PreviousChild</code></td><td class="topAlign tblval"><code>21</code></td><td class="topAlign">Navigate to previous tab or child window.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Print</code></td><td class="topAlign tblval"><code>18</code></td><td class="topAlign">Print document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Quit</code></td><td class="topAlign tblval"><code>65</code></td><td class="topAlign">Quit the application.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Redo</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">Redo.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Refresh</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">Refresh or reload current document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Replace</code></td><td class="topAlign tblval"><code>25</code></td><td class="topAlign">Find and replace.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SaveAs</code></td><td class="topAlign tblval"><code>63</code></td><td class="topAlign">Save document after prompting the user for a file name.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Save</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Save document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectAll</code></td><td class="topAlign tblval"><code>26</code></td><td class="topAlign">Select all text.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Deselect</code></td><td class="topAlign tblval"><code>67</code></td><td class="topAlign">Deselect text. Since 5.1</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectEndOfBlock</code></td><td class="topAlign tblval"><code>55</code></td><td class="topAlign">Extend selection to the end of a text block. This shortcut is only used on macOS.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectEndOfDocument</code></td><td class="topAlign tblval"><code>57</code></td><td class="topAlign">Extend selection to end of document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectEndOfLine</code></td><td class="topAlign tblval"><code>53</code></td><td class="topAlign">Extend selection to end of line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectNextChar</code></td><td class="topAlign tblval"><code>44</code></td><td class="topAlign">Extend selection to next character.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectNextLine</code></td><td class="topAlign tblval"><code>48</code></td><td class="topAlign">Extend selection to next line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectNextPage</code></td><td class="topAlign tblval"><code>50</code></td><td class="topAlign">Extend selection to next page.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectNextWord</code></td><td class="topAlign tblval"><code>46</code></td><td class="topAlign">Extend selection to next word.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectPreviousChar</code></td><td class="topAlign tblval"><code>45</code></td><td class="topAlign">Extend selection to previous character.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectPreviousLine</code></td><td class="topAlign tblval"><code>49</code></td><td class="topAlign">Extend selection to previous line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectPreviousPage</code></td><td class="topAlign tblval"><code>51</code></td><td class="topAlign">Extend selection to previous page.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectPreviousWord</code></td><td class="topAlign tblval"><code>47</code></td><td class="topAlign">Extend selection to previous word.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectStartOfBlock</code></td><td class="topAlign tblval"><code>54</code></td><td class="topAlign">Extend selection to the start of a text block. This shortcut is only used on macOS.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectStartOfDocument</code></td><td class="topAlign tblval"><code>56</code></td><td class="topAlign">Extend selection to start of document.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::SelectStartOfLine</code></td><td class="topAlign tblval"><code>52</code></td><td class="topAlign">Extend selection to start of line.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Underline</code></td><td class="topAlign tblval"><code>29</code></td><td class="topAlign">Underline text.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Undo</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">Undo.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::UnknownKey</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Unbound key.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::WhatsThis</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Activate &quot;what's this&quot;.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::ZoomIn</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">Zoom in.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::ZoomOut</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">Zoom out.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::FullScreen</code></td><td class="topAlign tblval"><code>66</code></td><td class="topAlign">Toggle the window state to/from full screen.</td></tr>
<tr><td class="topAlign"><code>QKeySequence::Cancel</code></td><td class="topAlign tblval"><code>70</code></td><td class="topAlign">Cancel the current operation.</td></tr>
</table></div>
<p>This enum was introduced or modified in  Qt 4.2.</p>
<!-- @@@StandardKey -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QKeySequence[overload1]$$$QKeySequence -->
<h3 class="fn" id="QKeySequence"><a name="QKeySequence"></a>QKeySequence::<span class="name">QKeySequence</span>()</h3>
<p>Constructs an empty key sequence.</p>
<!-- @@@QKeySequence -->
<!-- $$$QKeySequence$$$QKeySequenceconstQString&SequenceFormat -->
<h3 class="fn" id="QKeySequence-1"><a name="QKeySequence-1"></a>QKeySequence::<span class="name">QKeySequence</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>key</i>, <span class="type"><a href="qkeysequence.html#SequenceFormat-enum">SequenceFormat</a></span> <i>format</i> = NativeText)</h3>
<p>Creates a key sequence from the <i>key</i> string, based on <i>format</i>.</p>
<p>For example &quot;Ctrl+O&quot; gives CTRL+'O'. The strings &quot;Ctrl&quot;, &quot;Shift&quot;, &quot;Alt&quot; and &quot;Meta&quot; are recognized, as well as their translated equivalents in the &quot;<a href="../qtwidgets/qshortcut.html">QShortcut</a>&quot; context (using <a href="../qtcore/qobject.html#tr">QObject::tr</a>()).</p>
<p>Up to four key codes may be entered by separating them with commas, e.g&#x2e; &quot;Alt+X,Ctrl+S,Q&quot;.</p>
<p>This constructor is typically used with <a href="../qtcore/qobject.html#tr">tr</a>(), so that shortcut keys can be replaced in translations:</p>
<pre class="cpp">

  <span class="type"><a href="../qtwidgets/qmenu.html">QMenu</a></span> <span class="operator">*</span>file <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="../qtwidgets/qmenu.html">QMenu</a></span>(<span class="keyword">this</span>);
  file<span class="operator">-</span><span class="operator">&gt;</span>addAction(tr(<span class="string">&quot;&amp;Open...&quot;</span>)<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(open())<span class="operator">,</span>
                    <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>(tr(<span class="string">&quot;Ctrl+O&quot;</span><span class="operator">,</span> <span class="string">&quot;File|Open&quot;</span>)));

</pre>
<p>Note the &quot;File|Open&quot; translator comment. It is by no means necessary, but it provides some context for the human translator.</p>
<!-- @@@QKeySequence -->
<!-- $$$QKeySequence$$$QKeySequenceintintintint -->
<h3 class="fn" id="QKeySequence-2"><a name="QKeySequence-2"></a>QKeySequence::<span class="name">QKeySequence</span>(<span class="type">int</span> <i>k1</i>, <span class="type">int</span> <i>k2</i> = 0, <span class="type">int</span> <i>k3</i> = 0, <span class="type">int</span> <i>k4</i> = 0)</h3>
<p>Constructs a key sequence with up to 4 keys <i>k1</i>, <i>k2</i>, <i>k3</i> and <i>k4</i>.</p>
<p>The key codes are listed in <a href="../qtcore/qt.html#Key-enum">Qt::Key</a> and can be combined with modifiers (see <a href="../qtcore/qt.html#Modifier-enum">Qt::Modifier</a>) such as <a href="../qtcore/qt.html#Modifier-enum">Qt::SHIFT</a>, <a href="../qtcore/qt.html#Modifier-enum">Qt::CTRL</a>, <a href="../qtcore/qt.html#Modifier-enum">Qt::ALT</a>, or <a href="../qtcore/qt.html#Modifier-enum">Qt::META</a>.</p>
<!-- @@@QKeySequence -->
<!-- $$$QKeySequence$$$QKeySequenceconstQKeySequence& -->
<h3 class="fn" id="QKeySequence-3"><a name="QKeySequence-3"></a>QKeySequence::<span class="name">QKeySequence</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>keysequence</i>)</h3>
<p>Copy constructor. Makes a copy of <i>keysequence</i>.</p>
<!-- @@@QKeySequence -->
<!-- $$$QKeySequence$$$QKeySequenceStandardKey -->
<h3 class="fn" id="QKeySequence-4"><a name="QKeySequence-4"></a>QKeySequence::<span class="name">QKeySequence</span>(<span class="type"><a href="qkeysequence.html#StandardKey-enum">StandardKey</a></span> <i>key</i>)</h3>
<p>Constructs a <a href="qkeysequence.html">QKeySequence</a> object for the given <i>key</i>. The result will depend on the currently running platform.</p>
<p>The resulting object will be based on the first element in the list of key bindings for the <i>key</i>.</p>
<p>This function was introduced in  Qt 4.2.</p>
<!-- @@@QKeySequence -->
<!-- $$$~QKeySequence[overload1]$$$~QKeySequence -->
<h3 class="fn" id="dtor.QKeySequence"><a name="dtor.QKeySequence"></a>QKeySequence::<span class="name">~QKeySequence</span>()</h3>
<p>Destroys the key sequence.</p>
<!-- @@@~QKeySequence -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn" id="count"><a name="count"></a><span class="type">int</span> QKeySequence::<span class="name">count</span>() const</h3>
<p>Returns the number of keys in the key sequence. The maximum is 4.</p>
<!-- @@@count -->
<!-- $$$fromString[overload1]$$$fromStringconstQString&SequenceFormat -->
<h3 class="fn" id="fromString"><a name="fromString"></a><code>[static] </code><span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> QKeySequence::<span class="name">fromString</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>str</i>, <span class="type"><a href="qkeysequence.html#SequenceFormat-enum">SequenceFormat</a></span> <i>format</i> = PortableText)</h3>
<p>Return a <a href="qkeysequence.html">QKeySequence</a> from the string <i>str</i> based on <i>format</i>.</p>
<p>This function was introduced in  Qt 4.1.</p>
<p><b>See also </b><a href="qkeysequence.html#toString">toString</a>().</p>
<!-- @@@fromString -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn" id="isEmpty"><a name="isEmpty"></a><span class="type">bool</span> QKeySequence::<span class="name">isEmpty</span>() const</h3>
<p>Returns <code>true</code> if the key sequence is empty; otherwise returns false.</p>
<!-- @@@isEmpty -->
<!-- $$$keyBindings[overload1]$$$keyBindingsStandardKey -->
<h3 class="fn" id="keyBindings"><a name="keyBindings"></a><code>[static] </code><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>&gt; QKeySequence::<span class="name">keyBindings</span>(<span class="type"><a href="qkeysequence.html#StandardKey-enum">StandardKey</a></span> <i>key</i>)</h3>
<p>Returns a list of key bindings for the given <i>key</i>. The result of calling this function will vary based on the target platform. The first element of the list indicates the primary shortcut for the given platform. If the result contains more than one result, these can be considered alternative shortcuts on the same platform for the given <i>key</i>.</p>
<p>This function was introduced in  Qt 4.2.</p>
<!-- @@@keyBindings -->
<!-- $$$listFromString[overload1]$$$listFromStringconstQString&SequenceFormat -->
<h3 class="fn" id="listFromString"><a name="listFromString"></a><code>[static] </code><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>&gt; QKeySequence::<span class="name">listFromString</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>str</i>, <span class="type"><a href="qkeysequence.html#SequenceFormat-enum">SequenceFormat</a></span> <i>format</i> = PortableText)</h3>
<p>Return a list of <a href="qkeysequence.html">QKeySequence</a> from the string <i>str</i> based on <i>format</i>.</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qkeysequence.html#fromString">fromString</a>() and <a href="qkeysequence.html#listToString">listToString</a>().</p>
<!-- @@@listFromString -->
<!-- $$$listToString[overload1]$$$listToStringconstQList<QKeySequence>&SequenceFormat -->
<h3 class="fn" id="listToString"><a name="listToString"></a><code>[static] </code><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QKeySequence::<span class="name">listToString</span>(const <span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span>&gt; &amp;<i>list</i>, <span class="type"><a href="qkeysequence.html#SequenceFormat-enum">SequenceFormat</a></span> <i>format</i> = PortableText)</h3>
<p>Return a string representation of <i>list</i> based on <i>format</i>.</p>
<p>This function was introduced in  Qt 5.1.</p>
<p><b>See also </b><a href="qkeysequence.html#toString">toString</a>() and <a href="qkeysequence.html#listFromString">listFromString</a>().</p>
<!-- @@@listToString -->
<!-- $$$matches[overload1]$$$matchesconstQKeySequence& -->
<h3 class="fn" id="matches"><a name="matches"></a><span class="type"><a href="qkeysequence.html#SequenceMatch-enum">SequenceMatch</a></span> QKeySequence::<span class="name">matches</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>seq</i>) const</h3>
<p>Matches the sequence with <i>seq</i>. Returns <a href="qkeysequence.html#SequenceMatch-enum">ExactMatch</a> if successful, <a href="qkeysequence.html#SequenceMatch-enum">PartialMatch</a> if <i>seq</i> matches incompletely, and <a href="qkeysequence.html#SequenceMatch-enum">NoMatch</a> if the sequences have nothing in common. Returns <a href="qkeysequence.html#SequenceMatch-enum">NoMatch</a> if <i>seq</i> is shorter.</p>
<!-- @@@matches -->
<!-- $$$mnemonic[overload1]$$$mnemonicconstQString& -->
<h3 class="fn" id="mnemonic"><a name="mnemonic"></a><code>[static] </code><span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> QKeySequence::<span class="name">mnemonic</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>Returns the shortcut key sequence for the mnemonic in <i>text</i>, or an empty key sequence if no mnemonics are found.</p>
<p>For example, mnemonic(&quot;E&amp;xit&quot;) returns <code>Qt::ALT+Qt::Key_X</code>, mnemonic(&quot;&amp;Quit&quot;) returns <code>ALT+Key_Q</code>, and mnemonic(&quot;Quit&quot;) returns an empty <a href="qkeysequence.html">QKeySequence</a>.</p>
<p>We provide a list of common mnemonics in English. At the time of writing, Microsoft and Open Group do not appear to have issued equivalent recommendations for other languages.</p>
<!-- @@@mnemonic -->
<!-- $$$swap[overload1]$$$swapQKeySequence& -->
<h3 class="fn" id="swap"><a name="swap"></a><span class="type">void</span> QKeySequence::<span class="name">swap</span>(<span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>other</i>)</h3>
<p>Swaps key sequence <i>other</i> with this key sequence. This operation is very fast and never fails.</p>
<p>This function was introduced in  Qt 4.8.</p>
<!-- @@@swap -->
<!-- $$$toString[overload1]$$$toStringSequenceFormat -->
<h3 class="fn" id="toString"><a name="toString"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QKeySequence::<span class="name">toString</span>(<span class="type"><a href="qkeysequence.html#SequenceFormat-enum">SequenceFormat</a></span> <i>format</i> = PortableText) const</h3>
<p>Return a string representation of the key sequence, based on <i>format</i>.</p>
<p>For example, the value <a href="../qtcore/qt.html#Modifier-enum">Qt::CTRL</a>+<a href="../qtcore/qt.html#Key-enum">Qt::Key_O</a> results in &quot;Ctrl+O&quot;. If the key sequence has multiple key codes, each is separated by commas in the string returned, such as &quot;Alt+X, Ctrl+Y, Z&quot;. The strings, &quot;Ctrl&quot;, &quot;Shift&quot;, etc. are translated using <a href="../qtcore/qobject.html#tr">QObject::tr</a>() in the &quot;<a href="../qtwidgets/qshortcut.html">QShortcut</a>&quot; context.</p>
<p>If the key sequence has no keys, an empty string is returned.</p>
<p>On macOS, the string returned resembles the sequence that is shown in the menu bar if <i>format</i> is <a href="qkeysequence.html#SequenceFormat-enum">QKeySequence::NativeText</a>; otherwise, the string uses the &quot;portable&quot; format, suitable for writing to a file.</p>
<p>This function was introduced in  Qt 4.1.</p>
<p><b>See also </b><a href="qkeysequence.html#fromString">fromString</a>().</p>
<!-- @@@toString -->
<!-- $$$operator QVariant[overload1]$$$operator QVariant -->
<h3 class="fn" id="operator-QVariant"><a name="operator-QVariant"></a>QKeySequence::<span class="name">operator QVariant</span>() const</h3>
<p>Returns the key sequence as a <a href="../qtcore/qvariant.html">QVariant</a></p>
<!-- @@@operator QVariant -->
<!-- $$$operator!=[overload1]$$$operator!=constQKeySequence& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QKeySequence::<span class="name">operator!=</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this key sequence is not equal to the <i>other</i> key sequence; otherwise returns <code>false</code>.</p>
<!-- @@@operator!= -->
<!-- $$$operator<[overload1]$$$operator<constQKeySequence& -->
<h3 class="fn" id="operator-lt"><a name="operator-lt"></a><span class="type">bool</span> QKeySequence::<span class="name">operator&lt;</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>other</i>) const</h3>
<p>Provides an arbitrary comparison of this key sequence and <i>other</i> key sequence. All that is guaranteed is that the operator returns <code>false</code> if both key sequences are equal and that (ks1 &lt; ks2) == !( ks2 &lt; ks1) if the key sequences are not equal.</p>
<p>This function is useful in some circumstances, for example if you want to use <a href="qkeysequence.html">QKeySequence</a> objects as keys in a <a href="../qtcore/qmap.html">QMap</a>.</p>
<p><b>See also </b><a href="qkeysequence.html#operator-eq-eq">operator==</a>(), <a href="qkeysequence.html#operator-not-eq">operator!=</a>(), <a href="qkeysequence.html#operator-gt">operator&gt;</a>(), <a href="qkeysequence.html#operator-lt-eq">operator&lt;=</a>(), and <a href="qkeysequence.html#operator-gt-eq">operator&gt;=</a>().</p>
<!-- @@@operator< -->
<!-- $$$operator<=[overload1]$$$operator<=constQKeySequence& -->
<h3 class="fn" id="operator-lt-eq"><a name="operator-lt-eq"></a><span class="type">bool</span> QKeySequence::<span class="name">operator&lt;=</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this key sequence is smaller or equal to the <i>other</i> key sequence; otherwise returns <code>false</code>.</p>
<p><b>See also </b><a href="qkeysequence.html#operator-eq-eq">operator==</a>(), <a href="qkeysequence.html#operator-not-eq">operator!=</a>(), <a href="qkeysequence.html#operator-lt">operator&lt;</a>(), <a href="qkeysequence.html#operator-gt">operator&gt;</a>(), and <a href="qkeysequence.html#operator-gt-eq">operator&gt;=</a>().</p>
<!-- @@@operator<= -->
<!-- $$$operator=[overload1]$$$operator=constQKeySequence& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;QKeySequence::<span class="name">operator=</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>other</i>)</h3>
<p>Assignment operator. Assigns the <i>other</i> key sequence to this object.</p>
<!-- @@@operator= -->
<!-- $$$operator=$$$operator=QKeySequence&& -->
<h3 class="fn" id="operator-eq-1"><a name="operator-eq-1"></a><span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;QKeySequence::<span class="name">operator=</span>(<span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;&amp;<i>other</i>)</h3>
<p>Move-assigns <i>other</i> to this <a href="qkeysequence.html">QKeySequence</a> instance.</p>
<p>This function was introduced in  Qt 5.2.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQKeySequence& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QKeySequence::<span class="name">operator==</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this key sequence is equal to the <i>other</i> key sequence; otherwise returns <code>false</code>.</p>
<!-- @@@operator== -->
<!-- $$$operator>[overload1]$$$operator>constQKeySequence& -->
<h3 class="fn" id="operator-gt"><a name="operator-gt"></a><span class="type">bool</span> QKeySequence::<span class="name">operator&gt;</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this key sequence is larger than the <i>other</i> key sequence; otherwise returns <code>false</code>.</p>
<p><b>See also </b><a href="qkeysequence.html#operator-eq-eq">operator==</a>(), <a href="qkeysequence.html#operator-not-eq">operator!=</a>(), <a href="qkeysequence.html#operator-lt">operator&lt;</a>(), <a href="qkeysequence.html#operator-lt-eq">operator&lt;=</a>(), and <a href="qkeysequence.html#operator-gt-eq">operator&gt;=</a>().</p>
<!-- @@@operator> -->
<!-- $$$operator>=[overload1]$$$operator>=constQKeySequence& -->
<h3 class="fn" id="operator-gt-eq"><a name="operator-gt-eq"></a><span class="type">bool</span> QKeySequence::<span class="name">operator&gt;=</span>(const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>other</i>) const</h3>
<p>Returns <code>true</code> if this key sequence is larger or equal to the <i>other</i> key sequence; otherwise returns <code>false</code>.</p>
<p><b>See also </b><a href="qkeysequence.html#operator-eq-eq">operator==</a>(), <a href="qkeysequence.html#operator-not-eq">operator!=</a>(), <a href="qkeysequence.html#operator-lt">operator&lt;</a>(), <a href="qkeysequence.html#operator-gt">operator&gt;</a>(), and <a href="qkeysequence.html#operator-lt-eq">operator&lt;=</a>().</p>
<!-- @@@operator>= -->
<!-- $$$operator[][overload1]$$$operator[]uint -->
<h3 class="fn" id="operator-5b-5d"><a name="operator-5b-5d"></a><span class="type">int</span> QKeySequence::<span class="name">operator[]</span>(<span class="type"><a href="../qtcore/qtglobal.html#uint-typedef">uint</a></span> <i>index</i>) const</h3>
<p>Returns a reference to the element at position <i>index</i> in the key sequence. This can only be used to read an element.</p>
<!-- @@@operator[] -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$qt_set_sequence_auto_mnemonic[overload1]$$$qt_set_sequence_auto_mnemonicbool -->
<h3 class="fn" id="qt_set_sequence_auto_mnemonic"><a name="qt_set_sequence_auto_mnemonic"></a><span class="type">void</span> <span class="name">qt_set_sequence_auto_mnemonic</span>(<span class="type">bool</span> <i>b</i>)</h3>
<p>Specifies whether mnemonics for menu items, labels, etc., should be honored or not. On Windows and X11, this feature is on by default; on macOS, it is off. When this feature is off (that is, when <i>b</i> is false), <a href="qkeysequence.html#mnemonic">QKeySequence::mnemonic</a>() always returns an empty string.</p>
<p><b>Note: </b>This function is not declared in any of Qt's header files. To use it in your application, declare the function prototype before calling it.</p><p><b>See also </b><a href="../qtwidgets/qshortcut.html">QShortcut</a>.</p>
<!-- @@@qt_set_sequence_auto_mnemonic -->
<!-- $$$operator<<[overload1]$$$operator<<QDataStream&constQKeySequence& -->
<h3 class="fn" id="operator-lt-lt"><a name="operator-lt-lt"></a><span class="type"><a href="../qtcore/qdatastream.html">QDataStream</a></span> &amp;<span class="name">operator&lt;&lt;</span>(<span class="type"><a href="../qtcore/qdatastream.html">QDataStream</a></span> &amp;<i>stream</i>, const <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>sequence</i>)</h3>
<p>Writes the key <i>sequence</i> to the <i>stream</i>.</p>
<p><b>See also </b><a href="../qtcore/datastreamformat.html">Format of the QDataStream operators</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>[overload1]$$$operator>>QDataStream&QKeySequence& -->
<h3 class="fn" id="operator-gt-gt"><a name="operator-gt-gt"></a><span class="type"><a href="../qtcore/qdatastream.html">QDataStream</a></span> &amp;<span class="name">operator&gt;&gt;</span>(<span class="type"><a href="../qtcore/qdatastream.html">QDataStream</a></span> &amp;<i>stream</i>, <span class="type"><a href="qkeysequence.html#QKeySequence">QKeySequence</a></span> &amp;<i>sequence</i>)</h3>
<p>Reads a key sequence from the <i>stream</i> into the key <i>sequence</i>.</p>
<p><b>See also </b><a href="../qtcore/datastreamformat.html">Format of the QDataStream operators</a>.</p>
<!-- @@@operator>> -->
</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>