<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # QKeySequence Class Reference ## [[QtGui](index.htm) module] 該QKeySequence類封裝所使用的快捷鍵的按鍵順序。[More...](#details) ### Types * `enum SequenceFormat { NativeText, PortableText }` * `enum SequenceMatch { NoMatch, PartialMatch, ExactMatch }` * `enum StandardKey { UnknownKey, HelpContents, WhatsThis, Open, ..., Quit }` ### Methods * `__init__ (self)` * `__init__ (self, QKeySequence?ks)` * `__init__ (self, QString?key, SequenceFormat?format)` * `__init__ (self, int?k1, int?key2?=?0, int?key3?=?0, int?key4?=?0)` * `__init__ (self, QVariant?variant)` * `int count (self)` * `bool isDetached (self)` * `bool isEmpty (self)` * `SequenceMatch matches (self, QKeySequence?seq)` * `swap (self, QKeySequence?other)` * `QString toString (self, SequenceFormat?format?=?QKeySequence.PortableText)` ### Static Methods * `QKeySequence fromString (QString?str, SequenceFormat?format?=?QKeySequence.PortableText)` * `list-of-QKeySequence keyBindings (StandardKey?key)` * `QKeySequence mnemonic (QString?text)` ### Special Methods * `bool __eq__ (self, QKeySequence?other)` * `bool __ge__ (self, QKeySequence?other)` * `int __getitem__ (self, int?i)` * `bool __gt__ (self, QKeySequence?other)` * `int __int__ (self)` * `bool __le__ (self, QKeySequence?other)` * `__len__ (self)` * `bool __lt__ (self, QKeySequence?ks)` * `bool __ne__ (self, QKeySequence?other)` * * * ## Detailed Description 這個類可以醃制。 [StandardKey](qkeysequence.html#StandardKey-enum),[QString](qstring.html)或Python的int對象可隨時使用[QKeySequence](qkeysequence.html)預計。 該QKeySequence類封裝所使用的快捷鍵的按鍵順序。 在其最常見的形式中,一個鍵序列描述了必須一起使用,以執行某些操作鍵的組合。密鑰序列用于與[QAction](qaction.html)對象到指定鍵盤快捷鍵可以用來觸發動作。 鍵序列可以用作鍵盤快捷鍵在三種不同的方式來構造: * For standard shortcuts, a [standard key](qkeysequence.html#StandardKey-enum) can be used to request the platform-specific key sequence associated with each shortcut. * For custom shortcuts, human-readable strings such as "Ctrl+X" can be used, and these can be translated into the appropriate shortcuts for users of different languages. Translations are made in the "[QShortcut](qshortcut.html)" context. * For hard-coded shortcuts, integer key codes can be specified with a combination of values defined by the [Qt.Key](qt.html#Key-enum) and [Qt.Modifier](qt.html#Modifier-enum) enum values. Each key code consists of a single [Qt.Key](qt.html#Key-enum) value and zero or more modifiers, such as [Qt.SHIFT](qt.html#Modifier-enum), [Qt.CTRL](qt.html#Modifier-enum), [Qt.ALT](qt.html#Modifier-enum) and [Qt.META](qt.html#Modifier-enum). 例如,**Ctrl P**可能用作用于打印文檔的快捷方式的序列,并且可以在以下任一方式來指定: ``` QKeySequence(QKeySequence.Print); QKeySequence(tr("Ctrl+P")); QKeySequence(tr("Ctrl+p")); QKeySequence([Qt](qt.html).CTRL + [Qt](qt.html).Key_P); ``` 需要注意的是,對于字母,在規范字符串的情況下并不重要。在上面的例子中,用戶并不需要按住**Shift**鍵激活用的“Ctrl + P ”指定一個快捷方式。然而,對于其他的鍵,使用**Shift**作為一個未指定的額外修飾鍵會導致混亂的鍵盤布局不同,所使用的那些開發者的應用程序的用戶。請參閱[Keyboard Layout Issues](#keyboard-layout-issues)下面的部分獲取更多細節。 優選的是,其中可以使用標準的快捷方式。當創建非標準的快捷鍵按鍵順序,你應該使用人類可讀的字符串優先于硬編碼的整數值。 QKeySequence對象可以強制轉換為[QString](qstring.html)取得該序列的人類可讀的翻譯版本。類似地,[toString](qkeysequence.html#toString)( )函數生成的菜單人類可讀的字符串使用。在Mac OS X ,適當的符號是用來使用的Macintosh鍵盤上的特殊鍵來形容鍵盤快捷鍵。 指定硬編碼鍵碼的另一種方法是使用字符的Unicode代碼點,例如, 'A'給出了相同的鍵順序[Qt.Key_A](qt.html#Key-enum)。 **Note:**在Mac OS X中,提及“ Ctrl”鍵,[Qt.CTRL](qt.html#Modifier-enum), Qt.Control和[Qt.ControlModifier](qt.html#KeyboardModifier-enum)對應于**Command**鍵在Macintosh鍵盤上,而凡提述“元” ,[Qt.META](qt.html#Modifier-enum), Qt.Meta和[Qt.MetaModifier](qt.html#KeyboardModifier-enum)對應于**Control**鍵。在Mac OS X開發人員可以使用相同的快捷鍵說明在所有平臺,并如預期般在Mac OS X的應用程序會自動工作 ### Standard Shortcuts QKeySequence定義了許多[standard keyboard shortcuts](qkeysequence.html#StandardKey-enum)減少設置操作在一個典型的應用程序時所需的努力的量。下表顯示了通常由四個廣泛使用的平臺的應用程序中使用這些標準的快捷方式一些常見的鍵序列。請注意,在Mac OS X中,**Ctrl**值對應于**Command**鍵在Macintosh鍵盤上,并且**Meta**值對應于**Control**鍵。 | [StandardKey](qkeysequence.html#StandardKey-enum) | Windows | Mac OS X | KDE | GNOME | S60 | | --- | --- | --- | --- | --- | --- | | [HelpContents](qkeysequence.html#StandardKey-enum) | F1 | Ctrl+? | F1 | F1 | F2 | | [WhatsThis](qkeysequence.html#StandardKey-enum) | Shift+F1 | Shift+F1 | Shift+F1 | Shift+F1 | Shift+F1 | | Open | Ctrl+O | Ctrl+O | Ctrl+O | Ctrl+O | (none) | | Close | Ctrl+F4, Ctrl+W | Ctrl+W, Ctrl+F4 | Ctrl+W | Ctrl+W | (none) | | Save | Ctrl+S | Ctrl+S | Ctrl+S | Ctrl+S | (none) | | Quit | | Ctrl+Q | Qtrl+Q | Qtrl+Q | (none) | | [SaveAs](qkeysequence.html#StandardKey-enum) | | Ctrl+Shift+S | | Ctrl+Shift+S | (none) | | New | Ctrl+N | Ctrl+N | Ctrl+N | Ctrl+N | (none) | | Delete | Del | Del, Meta+D | Del, Ctrl+D | Del, Ctrl+D | Del | | Cut | Ctrl+X, Shift+Del | Ctrl+X | Ctrl+X, F20, Shift+Del | Ctrl+X, F20, Shift+Del | Ctrl+X | | Copy | Ctrl+C, Ctrl+Ins | Ctrl+C | Ctrl+C, F16, Ctrl+Ins | Ctrl+C, F16, Ctrl+Ins | Ctrl+C | | Paste | Ctrl+V, Shift+Ins | Ctrl+V | Ctrl+V, F18, Shift+Ins | Ctrl+V, F18, Shift+Ins | Ctrl+V | | Preferences | | Ctrl+, | | | (none) | | Undo | Ctrl+Z, Alt+Backspace | Ctrl+Z | Ctrl+Z, F14 | Ctrl+Z, F14 | Ctrl+Z | | Redo | Ctrl+Y, Shift+Ctrl+Z, Alt+Shift+Backspace | Ctrl+Shift+Z | Ctrl+Shift+Z | Ctrl+Shift+Z | (none) | | Back | Alt+Left, Backspace | Ctrl+[ | Alt+Left | Alt+Left | (none) | | Forward | Alt+Right, Shift+Backspace | Ctrl+] | Alt+Right | Alt+Right | (none) | | Refresh | F5 | F5 | F5 | Ctrl+R, F5 | (none) | | [ZoomIn](qkeysequence.html#StandardKey-enum) | Ctrl+Plus | Ctrl+Plus | Ctrl+Plus | Ctrl+Plus | (none) | | [ZoomOut](qkeysequence.html#StandardKey-enum) | Ctrl+Minus | Ctrl+Minus | Ctrl+Minus | Ctrl+Minus | (none) | | Print | Ctrl+P | Ctrl+P | Ctrl+P | Ctrl+P | (none) | | [AddTab](qkeysequence.html#StandardKey-enum) | Ctrl+T | Ctrl+T | Ctrl+Shift+N, Ctrl+T | Ctrl+T | (none) | | [NextChild](qkeysequence.html#StandardKey-enum) | Ctrl+Tab, Forward, Ctrl+F6 | Ctrl+}, Forward, Ctrl+Tab | Ctrl+Tab, Forward, Ctrl+Comma | Ctrl+Tab, Forward | (none) | | [PreviousChild](qkeysequence.html#StandardKey-enum) | Ctrl+Shift+Tab, Back, Ctrl+Shift+F6 | Ctrl+{, Back, Ctrl+Shift+Tab | Ctrl+Shift+Tab, Back, Ctrl+Period | Ctrl+Shift+Tab, Back | (none) | | Find | Ctrl+F | Ctrl+F | Ctrl+F | Ctrl+F | (none) | | [FindNext](qkeysequence.html#StandardKey-enum) | F3, Ctrl+G | Ctrl+G | F3 | Ctrl+G, F3 | (none) | | [FindPrevious](qkeysequence.html#StandardKey-enum) | Shift+F3, Ctrl+Shift+G | Ctrl+Shift+G | Shift+F3 | Ctrl+Shift+G, Shift+F3 | (none) | | Replace | Ctrl+H | (none) | Ctrl+R | Ctrl+H | (none) | | [SelectAll](qkeysequence.html#StandardKey-enum) | Ctrl+A | Ctrl+A | Ctrl+A | Ctrl+A | (none) | | Bold | Ctrl+B | Ctrl+B | Ctrl+B | Ctrl+B | (none) | | Italic | Ctrl+I | Ctrl+I | Ctrl+I | Ctrl+I | (none) | | Underline | Ctrl+U | Ctrl+U | Ctrl+U | Ctrl+U | (none) | | [MoveToNextChar](qkeysequence.html#StandardKey-enum) | Right | Right | Right | Right | Right | | [MoveToPreviousChar](qkeysequence.html#StandardKey-enum) | Left | Left | Left | Left | Left | | [MoveToNextWord](qkeysequence.html#StandardKey-enum) | Ctrl+Right | Alt+Right | Ctrl+Right | Ctrl+Right | Ctrl+Right | | [MoveToPreviousWord](qkeysequence.html#StandardKey-enum) | Ctrl+Left | Alt+Left | Ctrl+Left | Ctrl+Left | Ctrl+Left | | [MoveToNextLine](qkeysequence.html#StandardKey-enum) | Down | Down | Down | Down | Down | | [MoveToPreviousLine](qkeysequence.html#StandardKey-enum) | Up | Up | Up | Up | Up | | [MoveToNextPage](qkeysequence.html#StandardKey-enum) | PgDown | PgDown, Alt+PgDown, Meta+Down, Meta+PgDown | PgDown | PgDown | PgDown | | [MoveToPreviousPage](qkeysequence.html#StandardKey-enum) | PgUp | PgUp, Alt+PgUp, Meta+Up, Meta+PgUp | PgUp | PgUp | PgUp | | [MoveToStartOfLine](qkeysequence.html#StandardKey-enum) | Home | Ctrl+Left, Meta+Left | Home | Home | Home | | [MoveToEndOfLine](qkeysequence.html#StandardKey-enum) | End | Ctrl+Right, Meta+Right | End | End | End | | [MoveToStartOfBlock](qkeysequence.html#StandardKey-enum) | (none) | Alt+Up, Meta+A | (none) | (none) | (none) | | [MoveToEndOfBlock](qkeysequence.html#StandardKey-enum) | (none) | Alt+Down, Meta+E | (none) | (none) | (none) | | [MoveToStartOfDocument](qkeysequence.html#StandardKey-enum) | Ctrl+Home | Ctrl+Up, Home | Ctrl+Home | Ctrl+Home | Ctrl+Home | | [MoveToEndOfDocument](qkeysequence.html#StandardKey-enum) | Ctrl+End | Ctrl+Down, End | Ctrl+End | Ctrl+End | Ctrl+End | | [SelectNextChar](qkeysequence.html#StandardKey-enum) | Shift+Right | Shift+Right | Shift+Right | Shift+Right | Shift+Right | | [SelectPreviousChar](qkeysequence.html#StandardKey-enum) | Shift+Left | Shift+Left | Shift+Left | Shift+Left | Shift+Left | | [SelectNextWord](qkeysequence.html#StandardKey-enum) | Ctrl+Shift+Right | Alt+Shift+Right | Ctrl+Shift+Right | Ctrl+Shift+Right | Ctrl+Shift+Right | | [SelectPreviousWord](qkeysequence.html#StandardKey-enum) | Ctrl+Shift+Left | Alt+Shift+Left | Ctrl+Shift+Left | Ctrl+Shift+Left | Ctrl+Shift+Left | | [SelectNextLine](qkeysequence.html#StandardKey-enum) | Shift+Down | Shift+Down | Shift+Down | Shift+Down | Shift+Down | | [SelectPreviousLine](qkeysequence.html#StandardKey-enum) | Shift+Up | Shift+Up | Shift+Up | Shift+Up | Shift+Up | | [SelectNextPage](qkeysequence.html#StandardKey-enum) | Shift+PgDown | Shift+PgDown | Shift+PgDown | Shift+PgDown | Shift+PgDown | | [SelectPreviousPage](qkeysequence.html#StandardKey-enum) | Shift+PgUp | Shift+PgUp | Shift+PgUp | Shift+PgUp | Shift+PgUp | | [SelectStartOfLine](qkeysequence.html#StandardKey-enum) | Shift+Home | Ctrl+Shift+Left | Shift+Home | Shift+Home | Shift+Home | | [SelectEndOfLine](qkeysequence.html#StandardKey-enum) | Shift+End | Ctrl+Shift+Right | Shift+End | Shift+End | Shift+End | | [SelectStartOfBlock](qkeysequence.html#StandardKey-enum) | (none) | Alt+Shift+Up, Meta+Shift+A | (none) | (none) | (none) | | [SelectEndOfBlock](qkeysequence.html#StandardKey-enum) | (none) | Alt+Shift+Down, Meta+Shift+E | (none) | (none) | (none) | | [SelectStartOfDocument](qkeysequence.html#StandardKey-enum) | Ctrl+Shift+Home | Ctrl+Shift+Up, Shift+Home | Ctrl+Shift+Home | Ctrl+Shift+Home | Ctrl+Shift+Home | | [SelectEndOfDocument](qkeysequence.html#StandardKey-enum) | Ctrl+Shift+End | Ctrl+Shift+Down, Shift+End | Ctrl+Shift+End | Ctrl+Shift+End | Ctrl+Shift+End | | [DeleteStartOfWord](qkeysequence.html#StandardKey-enum) | Ctrl+Backspace | Alt+Backspace | Ctrl+Backspace | Ctrl+Backspace | (none) | | [DeleteEndOfWord](qkeysequence.html#StandardKey-enum) | Ctrl+Del | (none) | Ctrl+Del | Ctrl+Del | (none) | | [DeleteEndOfLine](qkeysequence.html#StandardKey-enum) | (none) | (none) | Ctrl+K | Ctrl+K | (none) | | [InsertParagraphSeparator](qkeysequence.html#StandardKey-enum) | Enter | Enter | Enter | Enter | (none) | | [InsertLineSeparator](qkeysequence.html#StandardKey-enum) | Shift+Enter | Meta+Enter | Shift+Enter | Shift+Enter | (none) | 需要注意的是,由于用于標準的快捷方式鍵順序的平臺之間的不同,你還需要在每個平臺上測試你的快捷方式,以確保您不會意外分配相同的密鑰序列的許多行動。 ### Keyboard Layout Issues 許多關鍵序列規格是由基于某些類型的鍵盤布局,而不是選擇代表一個動作的名稱的第一個字母鍵,如開發商選擇**Ctrl S**( “ Ctrl + S鍵” )或**Ctrl C**( “ Ctrl + C鍵” ) 。此外,由于某些符號只能用組合鍵對某些鍵盤布局的幫助輸入,用于與一種鍵盤布局使用按鍵序列可以映射到一個不同的密鑰,地圖無鑰匙可言,或者需要額外的輔助鍵來用在不同的鍵盤布局。 例如,快捷方式,**Ctrl plus**和**Ctrl minus**,通常被用作用于圖形應用縮放操作的快捷鍵,并且這些可以的“Ctrl + - ”指定的“Ctrl + + ”和分別。然而,這些快捷方式指定和解釋的方式取決于鍵盤布局。挪威鍵盤的用戶會注意到,**+**和**-**鍵不是鍵盤上相鄰,但仍然能夠激活兩個快捷鍵,而不需要按下**Shift**鍵。然而,用戶與英國的鍵盤需要按住**Shift**鍵進入**+**符號,使得快捷有效地同為“ Ctrl + Shift + = ” 。 雖然有些開發商可能會采取完全指定所有他們用自己的鍵盤來啟動快捷方式的改性劑,這也將導致不同的鍵盤布局的用戶意外行為。 例如,使用英國鍵盤的顯影劑可能會決定指定“ Ctrl + Shift + =”作為密鑰序列,以便創建巧合的行為以同樣的方式作為快捷方式**Ctrl plus**。然而,本**=**鍵需要使用被訪問的**Shift**挪威鍵盤上的按鍵,有效地使所需要的快捷方式**Ctrl Shift Shift =**(一個不可能的組合鍵) 。 其結果是,兩個人可讀的字符串和硬編碼的密鑰代碼既可以是有問題的指定可以在各種不同的鍵盤布局中使用的鍵序列時使用。只有使用[standard shortcuts](qkeysequence.html#StandardKey-enum)保證了用戶將能夠使用該開發人員的意圖的快捷方式。 盡管這樣,我們就可以通過確保人類可讀的字符串的使用,從而有可能為不同語言的用戶作出鍵序列的翻譯解決這個問題。這種方法會成功的用戶,其鍵盤對他們所使用的語言是最典型布局。 ### GNU Emacs Style Key Sequences 類似于使用鍵序列[GNU Emacs](http://www.gnu.org/software/emacs/),允許最多四個按鍵代碼,可以通過使用多個參數的構造函數,或者通過逗號分隔的鍵序列的人類可讀的字符串被創建。 例如,密鑰序列**Ctrl X**其次是**Ctrl C**,可以使用以下任一方式來指定: ``` QKeySequence(tr("Ctrl+X, Ctrl+C")); QKeySequence([Qt](qt.html).CTRL + [Qt](qt.html).Key_X, [Qt](qt.html).CTRL + [Qt](qt.html).Key_C); ``` **Warning:** A [QApplication](qapplication.html)實例必須已建成創建QKeySequence之前,否則,你的應用程序可能會崩潰。 * * * ## Type Documentation ``` QKeySequence.SequenceFormat ``` | Constant | Value | Description | | --- | --- | --- | | `QKeySequence.NativeText` | `0` | 該密鑰序列為平臺特定的字符串。這意味著,它將會顯示翻譯并在Mac上它會像一個鍵序列從菜單欄。當你想要顯示的字符串給用戶這個枚舉最好用。 | | `QKeySequence.PortableText` | `1` | 鍵序列中給出一個“便攜式”的格式,適合閱讀和寫入文件。在許多情況下,它看起來將類似于在Windows和X11原生文本。 | ``` QKeySequence.SequenceMatch ``` | Constant | Value | Description | | --- | --- | --- | | `QKeySequence.NoMatch` | `0` | 該鍵序列是不同的,不甚至部分匹配。 | | `QKeySequence.PartialMatch` | `1` | 該鍵序列匹配部分,但也不盡相同。 | | `QKeySequence.ExactMatch` | `2` | 密鑰序列是相同的。 | ``` QKeySequence.StandardKey ``` 這個枚舉表示標準的鍵綁定。它們可以用于分配依賴于平臺的鍵盤快捷鍵,一[QAction](qaction.html)。 請注意,鍵綁定是平臺相關的。當前綁定的快捷鍵可以使用查詢[keyBindings](qkeysequence.html#keyBindings)( ) 。 | Constant | Value | Description | | --- | --- | --- | | `QKeySequence.AddTab` | `19` | 添加新的選項卡。 | | `QKeySequence.Back` | `13` | 導航回。 | | `QKeySequence.Bold` | `27` | 粗體文本。 | | `QKeySequence.Close` | `4` | 關閉文件/選項卡。 | | `QKeySequence.Copy` | `9` | 復制。 | | `QKeySequence.Cut` | `8` | 切。 | | `QKeySequence.Delete` | `7` | 刪除。 | | `QKeySequence.DeleteEndOfLine` | `60` | 刪除行尾。 | | `QKeySequence.DeleteEndOfWord` | `59` | 從游標的末尾刪除單詞。 | | `QKeySequence.DeleteStartOfWord` | `58` | 刪除一個字到光標的開始。 | | `QKeySequence.Find` | `22` | 查找文件。 | | `QKeySequence.FindNext` | `23` | 查找下一個結果。 | | `QKeySequence.FindPrevious` | `24` | 查找上一個結果。 | | `QKeySequence.Forward` | `14` | 向前導航。 | | `QKeySequence.HelpContents` | `1` | 打開幫助內容。 | | `QKeySequence.InsertLineSeparator` | `62` | 插入一個新行。 | | `QKeySequence.InsertParagraphSeparator` | `61` | 插入一個新的段落。 | | `QKeySequence.Italic` | `28` | 斜體文本。 | | `QKeySequence.MoveToEndOfBlock` | `41` | 移動光標到塊的結尾。此快捷方式僅用于在OS X。 | | `QKeySequence.MoveToEndOfDocument` | `43` | 將光標移動到文件末尾。 | | `QKeySequence.MoveToEndOfLine` | `39` | 移動光標到行尾。 | | `QKeySequence.MoveToNextChar` | `30` | 將光標移動到下一個字符。 | | `QKeySequence.MoveToNextLine` | `34` | 將光標移動到下一行。 | | `QKeySequence.MoveToNextPage` | `36` | 將光標移動到下一個頁面。 | | `QKeySequence.MoveToNextWord` | `32` | 將光標移動到下一個單詞。 | | `QKeySequence.MoveToPreviousChar` | `31` | 將光標移動到前一個字符。 | | `QKeySequence.MoveToPreviousLine` | `35` | 移動光標到上一行。 | | `QKeySequence.MoveToPreviousPage` | `37` | 將光標移動到上一個頁面。 | | `QKeySequence.MoveToPreviousWord` | `33` | 將光標移動到前一個單詞。 | | `QKeySequence.MoveToStartOfBlock` | `40` | 將光標移動到開始一個塊。此快捷方式僅用于OS X。 | | `QKeySequence.MoveToStartOfDocument` | `42` | 移動光標到啟動文件。 | | `QKeySequence.MoveToStartOfLine` | `38` | 移動光標到行首。 | | `QKeySequence.New` | `6` | 創建新文檔。 | | `QKeySequence.NextChild` | `20` | 導航到下一個選項卡或子窗口。 | | `QKeySequence.Open` | `3` | 打開的文檔。 | | `QKeySequence.Paste` | `10` | 粘貼。 | | `QKeySequence.Preferences` | `64` | 打開選項對話框。 | | `QKeySequence.PreviousChild` | `21` | 瀏覽上一個選項卡或子窗口。 | | `QKeySequence.Print` | `18` | 打印文檔。 | | `QKeySequence.Quit` | `65` | 退出應用程序。 | | `QKeySequence.Redo` | `12` | 重做。 | | `QKeySequence.Refresh` | `15` | 刷新或重新加載當前文檔。 | | `QKeySequence.Replace` | `25` | 查找和替換。 | | `QKeySequence.SaveAs` | `63` | 提示用戶輸入一個文件名后保存文件。 | | `QKeySequence.Save` | `5` | 保存文件。 | | `QKeySequence.SelectAll` | `26` | 選擇所有文本。 | | `QKeySequence.SelectEndOfBlock` | `55` | 擴展選擇到文本塊的結尾。此快捷方式僅用于OS X。 | | `QKeySequence.SelectEndOfDocument` | `57` | 擴展選擇到文件末尾。 | | `QKeySequence.SelectEndOfLine` | `53` | 擴展選擇到行尾。 | | `QKeySequence.SelectNextChar` | `44` | 擴展選擇到下一個字符。 | | `QKeySequence.SelectNextLine` | `48` | 擴展選擇到下一行。 | | `QKeySequence.SelectNextPage` | `50` | 擴展選擇到下一個頁面。 | | `QKeySequence.SelectNextWord` | `46` | 擴展選擇到下一個單詞。 | | `QKeySequence.SelectPreviousChar` | `45` | 擴展選擇到一個字符。 | | `QKeySequence.SelectPreviousLine` | `49` | 擴展選擇到上一行。 | | `QKeySequence.SelectPreviousPage` | `51` | 擴展選擇到上一個頁面。 | | `QKeySequence.SelectPreviousWord` | `47` | 擴展選擇到上一個單詞。 | | `QKeySequence.SelectStartOfBlock` | `54` | 擴展選擇到一個文本塊的開始。此快捷方式僅用于OS X。 | | `QKeySequence.SelectStartOfDocument` | `56` | 擴展選擇開始文檔。 | | `QKeySequence.SelectStartOfLine` | `52` | 擴展選擇到行首。 | | `QKeySequence.Underline` | `29` | 下劃線的文本。 | | `QKeySequence.Undo` | `11` | 撤消。 | | `QKeySequence.UnknownKey` | `0` | 未綁定的關鍵。 | | `QKeySequence.WhatsThis` | `2` | 激活什么的。 | | `QKeySequence.ZoomIn` | `16` | 放大。 | | `QKeySequence.ZoomOut` | `17` | 縮小。 | 這個枚舉被引入或修改的Qt 4.2 。 * * * ## Method Documentation ``` QKeySequence.__init__ (self) ``` 構造一個空鍵序列。 ``` QKeySequence.__init__ (self, QKeySequence?ks) ``` 創建從一個鍵序列_key_字符串。例如“ CTRL + O ”給出Ctrl + 'O' 。字符串“ Ctrl”鍵, “Shift”鍵, “ Alt”鍵和“元”均確認,以及他們的翻譯等價于“[QShortcut](qshortcut.html)“上下文(使用[QObject.tr](qobject.html#tr)())。 最多四個按鍵代碼可以通過用逗號分隔輸入,如: “ALT + X , Ctrl + S鍵, Q” 。 _key_應該是在[NativeText](qkeysequence.html#SequenceFormat-enum)格式。 此構造方法通常用于[tr](qobject.html#tr)( ) ,這樣的快捷鍵可以更換的翻譯: ``` [QMenu](qmenu.html) *file = new [QMenu](qmenu.html)(this); file->addAction(tr("&Open..."), this, SLOT(open()), [QKeySequence](qkeysequence.html)(tr("Ctrl+O", "File|Open"))); ``` 請注意“文件|打開”翻譯注釋。它是由無必要手段,但它提供了一些背景的人翻譯。 ``` QKeySequence.__init__ (self, QString?key, SequenceFormat?format) ``` 創建從一個鍵序列_key_字符串的基礎上_format_。 此功能被引入Qt的4.7 。 ``` QKeySequence.__init__ (self, int?k1, int?key2?=?0, int?key3?=?0, int?key4?=?0) ``` 構建了一個密鑰序列具有多達4個按鍵_k1_,_k2_,_k3_和_k4_。 關鍵的代碼列在[Qt.Key](qt.html#Key-enum)并且可以與改性劑相結合(見[Qt.Modifier](qt.html#Modifier-enum))如[Qt.SHIFT](qt.html#Modifier-enum),[Qt.CTRL](qt.html#Modifier-enum),[Qt.ALT](qt.html#Modifier-enum)或[Qt.META](qt.html#Modifier-enum)。 ``` QKeySequence.__init__ (self, QVariant?variant) ``` 拷貝構造函數。使得副本_keysequence_。 ``` int QKeySequence.count (self) ``` 返回鍵的鍵序列的數目。最大值是4 。 ``` QKeySequence QKeySequence.fromString (QString?str, SequenceFormat?format?=?QKeySequence.PortableText) ``` [](qkeysequence.html) [返回](qkeysequence.html)[QKeySequence](qkeysequence.html)從字符串_str_基于_format_。 這個函數是Qt 4.1中引入。 **See also** [toString](qkeysequence.html#toString)( ) 。 ``` bool QKeySequence.isDetached (self) ``` ``` bool QKeySequence.isEmpty (self) ``` 返回True如果密鑰序列為空,否則返回False 。 ``` list-of-QKeySequence QKeySequence.keyBindings (StandardKey?key) ``` 返回鍵綁定的列表為給定的_key_。調用此函數的結果會根據目標平臺上有所不同。列表中的第一個元素表示為給定平臺的主要捷徑。如果結果包含一個以上的結果是,這些可以被認為是另一種快捷方式對給定相同的平臺上_key_。 這個函數中引入了Qt 4.2中。 ``` SequenceMatch QKeySequence.matches (self, QKeySequence?seq) ``` [](qkeysequence.html#SequenceMatch-enum) [匹配序列_seq_。回報](qkeysequence.html#SequenceMatch-enum)[ExactMatch](qkeysequence.html#SequenceMatch-enum)如果成功的話,[PartialMatch](qkeysequence.html#SequenceMatch-enum)如果_seq_不完全匹配,并[NoMatch](qkeysequence.html#SequenceMatch-enum)如果序列沒有任何共同之處。回報[NoMatch](qkeysequence.html#SequenceMatch-enum)如果_seq_較短。 ``` QKeySequence QKeySequence.mnemonic (QString?text) ``` [ 返回助記符中的快捷鍵序列_text_,或者一個空鍵序列,如果沒有助記符發現。 ](qkeysequence.html) [例如,助記符( “E & XIT ” )返回`Qt.ALT+Qt.Key_X`,助記符( “戒菸大” )的回報`ALT+Key_Q`和助記符( “退出” )返回一個空](qkeysequence.html)[QKeySequence](qkeysequence.html)。 我們提供了一個[list of common mnemonics](index.htm)英文的。在撰寫本文時,微軟及公開組似乎并沒有發出其他語言的等價建議。 **See also** [qt_set_sequence_auto_mnemonic](index.htm#qt_set_sequence_auto_mnemonic)( ) 。 ``` QKeySequence.swap (self, QKeySequence?other) ``` 交換密鑰序列_other_與此鍵序列。這個操作是非常快的,而且永遠不會。 此功能被引入Qt的4.8 。 ``` QString QKeySequence.toString (self, SequenceFormat?format?=?QKeySequence.PortableText) ``` 返回鍵序列的字符串表示形式的基礎上,_format_。 例如,該值[Qt.CTRL](qt.html#Modifier-enum)+[Qt.Key_O](qt.html#Key-enum)結果在“ CTRL + O ” 。如果密鑰序列具有多個密鑰代碼,每一個由逗號分隔的字符串中返回,如“ Alt + X組合,按Ctrl + Y,Z ” 。琴弦, “Ctrl”鍵, “Shift”鍵,使用等換算[QObject.tr](qobject.html#tr)在( )中的“[QShortcut](qshortcut.html)“上下文。 如果密鑰序列沒有按鍵,則返回一個空字符串。 在Mac OS X ,返回的字符串類似于顯示在菜單欄的順序。 這個函數是Qt 4.1中引入。 **See also** [fromString](qkeysequence.html#fromString)( ) 。 ``` bool QKeySequence.__eq__ (self, QKeySequence?other) ``` ``` bool QKeySequence.__ge__ (self, QKeySequence?other) ``` ``` int QKeySequence.__getitem__ (self, int?i) ``` ``` bool QKeySequence.__gt__ (self, QKeySequence?other) ``` ``` int QKeySequence.__int__ (self) ``` ``` bool QKeySequence.__le__ (self, QKeySequence?other) ``` ``` QKeySequence.__len__ (self) ``` ``` bool QKeySequence.__lt__ (self, QKeySequence?ks) ``` ``` bool QKeySequence.__ne__ (self, QKeySequence?other) ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看