<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # QCursor Class Reference ## [[QtGui](index.htm) module] 該QCursor類提供一個鼠標光標具有任意形狀。[More...](#details) ### Methods * `__init__ (self)` * `__init__ (self, Qt.CursorShape?shape)` * `__init__ (self, QBitmap?bitmap, QBitmap?mask, int?hotX?=?-1, int?hotY?=?-1)` * `__init__ (self, QPixmap?pixmap, int?hotX?=?-1, int?hotY?=?-1)` * `__init__ (self, QCursor?cursor)` * `__init__ (self, QVariant?variant)` * `QBitmap bitmap (self)` * `QPoint hotSpot (self)` * `QBitmap mask (self)` * `QPixmap pixmap (self)` * `setShape (self, Qt.CursorShape?newShape)` * `Qt.CursorShape shape (self)` ### Static Methods * `QPoint pos ()` * `setPos (int?x, int?y)` * `setPos (QPoint?p)` * * * ## Detailed Description A [Qt.CursorShape](qt.html#CursorShape-enum)可用于每當一個[QCursor](qcursor.html)預計。 該QCursor類提供一個鼠標光標具有任意形狀。 這個類主要用來創建與特定的小部件關聯的鼠標光標,并獲取和設置鼠標光標的位置。 Qt擁有一系列標準光標形狀,而是根據你也可以自定義光標形狀[QBitmap](qbitmap.html),口罩和熱點。 一個游標,窗口小部件,使用相關聯[QWidget.setCursor](qwidget.html#cursor-prop)( ) 。以一個游標的所有部件(通常為很短的時間內) ,使用關聯[QApplication.setOverrideCursor](qapplication.html#setOverrideCursor)( ) 。 要設置光標形狀的使用[QCursor.setShape](qcursor.html#setShape)( )或使用QCursor構造函數需要的形狀作為參數,也可以使用在定義的預定義光標中的一個[Qt.CursorShape](qt.html#CursorShape-enum)枚舉。 如果你想創建一個游標與自己的位圖,或者使用QCursor構造函數,它接受一個位圖和口罩或這需要一個像素圖作為參數的構造函數。 設置或獲取鼠標光標的位置使用靜態方法[QCursor.pos](qcursor.html#pos)()和[QCursor.setPos](qcursor.html#setPos)( ) 。 **Note:**這是可能的前創建QCursor[QApplication](qapplication.html),但它不是只是作為一個佔位之后創建一個真正的QCursor有用[QApplication](qapplication.html)。嘗試使用之前創建的QCursor[QApplication](qapplication.html)會導致系統崩潰。 ### A Note for X11 Users 在X11上, Qt支持[Xcursor](http://www.xfree86.org/4.3.0/Xcursor.3.html)庫,它允許全彩色圖標主題。下表顯示了用于每個游標名[Qt.CursorShape](qt.html#CursorShape-enum)值。如果游標不能使用下面的名稱被發現,一個標準的X11光標將被代替使用。注: X11并沒有對所有可能提供適當的游標[Qt.CursorShape](qt.html#CursorShape-enum)值。這可能是一些游標將取自Xcursor主題,而另一些將使用的內部位圖的光標。 | Shape | [Qt.CursorShape](qt.html#CursorShape-enum) Value | Cursor Name | Shape | [Qt.CursorShape](qt.html#CursorShape-enum) Value | Cursor Name | | --- | --- | --- | --- | --- | --- | | ![](https://img.kancloud.cn/13/d6/13d699b563f24979498199be51d50a28_25x25.png) | [Qt.ArrowCursor](qt.html#CursorShape-enum) | `left_ptr` | ![](https://img.kancloud.cn/5f/8f/5f8f29fb417ac660fbe5e23edb82c124_25x25.png) | [Qt.SizeVerCursor](qt.html#CursorShape-enum) | `size_ver` | | ![](https://img.kancloud.cn/dd/c0/ddc0c2b593d717260ca4fe95e524abb3_25x25.png) | [Qt.UpArrowCursor](qt.html#CursorShape-enum) | `up_arrow` | ![](https://img.kancloud.cn/70/81/7081dc96504aadc4680debb820a41afc_25x25.png) | [Qt.SizeHorCursor](qt.html#CursorShape-enum) | `size_hor` | | ![](https://img.kancloud.cn/f1/f9/f1f90211225e3982c0e6c562b9bb09ff_25x25.png) | [Qt.CrossCursor](qt.html#CursorShape-enum) | `cross` | ![](https://img.kancloud.cn/0f/f0/0ff08c394d7b26213278d369b4040523_25x25.png) | [Qt.SizeBDiagCursor](qt.html#CursorShape-enum) | `size_bdiag` | | ![](https://img.kancloud.cn/09/20/0920b0f7649e1708e43ad2ac411130fd_25x25.png) | [Qt.IBeamCursor](qt.html#CursorShape-enum) | `ibeam` | ![](https://img.kancloud.cn/fc/39/fc3939c144ab67fb993a390ea35aa38e_25x25.png) | [Qt.SizeFDiagCursor](qt.html#CursorShape-enum) | `size_fdiag` | | ![](https://img.kancloud.cn/43/3e/433e8a00a92b71a250f9e0bb3a31a296_25x25.png) | [Qt.WaitCursor](qt.html#CursorShape-enum) | `wait` | ![](https://img.kancloud.cn/1c/ee/1ceeebf06526432aa2c8faa5cad54e5d_25x25.png) | [Qt.SizeAllCursor](qt.html#CursorShape-enum) | `size_all` | | ![](https://img.kancloud.cn/22/38/223846c70a28481c34e8daab62d9cfd0_32x32.png) | [Qt.BusyCursor](qt.html#CursorShape-enum) | `left_ptr_watch` | ![](https://img.kancloud.cn/17/29/1729c666b258ef7689027b3937b2c05d_25x25.png) | [Qt.SplitVCursor](qt.html#CursorShape-enum) | `split_v` | | ![](https://img.kancloud.cn/22/b5/22b53e65da32110c3260f4c4eb4aee84_25x25.png) | [Qt.ForbiddenCursor](qt.html#CursorShape-enum) | `forbidden` | ![](https://img.kancloud.cn/d0/84/d08475260d43d88580833e881704221e_25x25.png) | [Qt.SplitHCursor](qt.html#CursorShape-enum) | `split_h` | | ![](https://img.kancloud.cn/e7/9a/e79a530bf3ae88f9e00113433ad12901_25x25.png) | [Qt.PointingHandCursor](qt.html#CursorShape-enum) | `pointing_hand` | ![](https://img.kancloud.cn/31/69/316997c32537b9bd3d080513e37ef247_16x16.png) | [Qt.OpenHandCursor](qt.html#CursorShape-enum) | `openhand` | | ![](https://img.kancloud.cn/6b/5d/6b5d9d816ea29234d6a0794e92e57c7c_32x32.png) | [Qt.WhatsThisCursor](qt.html#CursorShape-enum) | `whats_this` | ![](https://img.kancloud.cn/1b/86/1b86ed3c4599a27c4f55342d68407b19_16x16.png) | [Qt.ClosedHandCursor](qt.html#CursorShape-enum) | `closedhand` | | | [Qt.DragMoveCursor](qt.html#CursorShape-enum) | `dnd-move` or `move` | | [Qt.DragCopyCursor](qt.html#CursorShape-enum) | `dnd-copy` or `copy` | | | [Qt.DragLinkCursor](qt.html#CursorShape-enum) | `dnd-link` or `link` | * * * ## Method Documentation ``` QCursor.__init__ (self) ``` 構造一個游標默認的箭頭形狀。 ``` QCursor.__init__ (self, Qt.CursorShape?shape) ``` 構造一個光標指定_shape_。 See [Qt.CursorShape](qt.html#CursorShape-enum)對于形狀的列表。 **See also** [setShape](qcursor.html#setShape)( ) 。 ``` QCursor.__init__ (self, QBitmap?bitmap, QBitmap?mask, int?hotX?=?-1, int?hotY?=?-1) ``` 構造一個自定義位圖的光標。 _bitmap_和_mask_補位圖。_hotX_和_hotY_定義游標的熱點。 If _hotX_是否定的,它被設置為`bitmap().width()/2`。如果_hotY_是否定的,它被設置為`bitmap().height()/2`。 光標_bitmap_(B)和_mask_(M )位組合是這樣的: * B=1 and M=1 gives black. * B=0 and M=1 gives white. * B=0 and M=0 gives transparent. * B=1 and M=0 gives an XOR'd result under Windows, undefined results on all other platforms. 使用全局Qt的顏色[Qt.color0](qt.html#GlobalColor-enum)繪制0像素和[Qt.color1](qt.html#GlobalColor-enum)繪制1像素的位圖。 有效的光標的大小取決于顯示硬件(或底層窗口系統) 。我們建議采用32 ×32的游標,因為這個大小是所有平臺都支持。有些平臺還支持16×16 , 48 ×480和64×64的游標。 **Note:**在Windows CE上,光標的大小是固定的。如果像素映像大于系統的大小,它會被縮放。 **See also** [QBitmap.QBitmap](qbitmap.html#QBitmap)()和[QBitmap.setMask](qpixmap.html#setMask)( ) 。 ``` QCursor.__init__ (self, QPixmap?pixmap, int?hotX?=?-1, int?hotY?=?-1) ``` 構造一個自定義的像素圖的光標。 _pixmap_是圖像。這是通常給它一個口罩使用(集[QPixmap.setMask](qpixmap.html#setMask)())。_hotX_和_hotY_定義游標的熱點。 If _hotX_是否定的,它被設置為`pixmap().width()/2`。如果_hotY_是否定的,它被設置為`pixmap().height()/2`。 有效的光標的大小取決于顯示硬件(或底層窗口系統) 。我們建議采用32 ×32的游標,因為這個大小是所有平臺都支持。有些平臺還支持16×16 , 48 ×480和64×64的游標。 **Note:**在Windows CE上,光標的大小是固定的。如果像素映像大于系統的大小,它會被縮放。 **See also** [QPixmap.QPixmap](qpixmap.html#QPixmap)()和[QPixmap.setMask](qpixmap.html#setMask)( ) 。 ``` QCursor.__init__ (self, QCursor?cursor) ``` 構造游標的副本_c_。 ``` QCursor.__init__ (self, QVariant?variant) ``` 構造一個Qt光標從給定的Windows_cursor_。 **Warning:**此功能僅適用于Windows。 **See also** [handle](qcursor.html#handle)( ) 。 ``` QBitmap QCursor.bitmap (self) ``` [ 返回光標的位圖,或者0 ,如果它是標準的游標之一。 ](qbitmap.html) ``` QPoint QCursor.hotSpot (self) ``` [ 返回光標的熱點,或( 0 , 0 ) ,如果它是標準的游標之一。 ](qpoint.html) ``` QBitmap QCursor.mask (self) ``` [ 返回光標的位圖掩碼,或者0 ,如果它是標準的游標之一。 ](qbitmap.html) ``` QPixmap QCursor.pixmap (self) ``` [ 返回游標像素圖。這是唯一有效的,如果游標是一個像素圖的光標。 ](qpixmap.html) ``` QPoint QCursor.pos () ``` [ 返回光標(熱點)在全球屏幕坐標的位置。 ](qpoint.html) [您可以致電](qpoint.html)[QWidget.mapFromGlobal](qwidget.html#mapFromGlobal)()把它翻譯出來給小部件的坐標。 **See also** [setPos](qcursor.html#setPos)( )[QWidget.mapFromGlobal](qwidget.html#mapFromGlobal)()和[QWidget.mapToGlobal](qwidget.html#mapToGlobal)( ) 。 ``` QCursor.setPos (int?x, int?y) ``` 移動光標(熱點)向全球屏幕位置(_x_,_y_) 。 您可以致電[QWidget.mapToGlobal](qwidget.html#mapToGlobal)( )翻譯小工具坐標轉換為全局屏幕坐標。 **See also** [pos](qcursor.html#pos)( )[QWidget.mapFromGlobal](qwidget.html#mapFromGlobal)()和[QWidget.mapToGlobal](qwidget.html#mapToGlobal)( ) 。 ``` QCursor.setPos (QPoint?p) ``` 這是一個重載函數。 移動光標(熱點),以點在全局屏幕位置_p_。 ``` QCursor.setShape (self, Qt.CursorShape?newShape) ``` 將光標設置到確定的形狀_shape_。 See [Qt.CursorShape](qt.html#CursorShape-enum)為光標形狀列表。 **See also** [shape](qcursor.html#shape)( ) 。 ``` Qt.CursorShape QCursor.shape (self) ``` [](qt.html#CursorShape-enum) [返回光標形狀標識符。返回值是一個](qt.html#CursorShape-enum)[Qt.CursorShape](qt.html#CursorShape-enum)枚舉值(轉換為int ) 。 **See also** [setShape](qcursor.html#setShape)( ) 。
                  <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>

                              哎呀哎呀视频在线观看