<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 功能強大 支持多語言、二開方便! 廣告
                # QScrollBar Class Reference ## [[QtGui](index.htm) module] 該QScrollBar小工具提供了一個垂直或水平滾動條。[More...](#details) 繼承[QAbstractSlider](qabstractslider.html)。 ### Methods * `__init__ (self, QWidget?parent?=?None)` * `__init__ (self, Qt.Orientation?orientation, QWidget?parent?=?None)` * `contextMenuEvent (self, QContextMenuEvent)` * `bool event (self, QEvent?event)` * `hideEvent (self, QHideEvent)` * `initStyleOption (self, QStyleOptionSlider?option)` * `mouseMoveEvent (self, QMouseEvent)` * `mousePressEvent (self, QMouseEvent)` * `mouseReleaseEvent (self, QMouseEvent)` * `paintEvent (self, QPaintEvent)` * `QSize sizeHint (self)` * `sliderChange (self, QAbstractSlider.SliderChange?change)` * * * ## Detailed Description 該QScrollBar小工具提供了一個垂直或水平滾動條。 滾動條是一個控制,使用戶能夠訪問一個文件,比用于顯示它的插件較大的部件。它提供的文檔中的用戶的當前位置的視覺指示,并且是可見的文檔的量。滾動條通常配有其他的控制,使更精確的導航。 Qt的滾動顯示的方式,適用于每個平臺吧。 如果你需要提供一個滾動視圖到另一個窗口小部件,它可能會更方便使用[QScrollArea](qscrollarea.html)類,因為這提供了一個視角構件和滾動條。如果你需要使用實施專門的小工具類似的功能QScrollBar是非常有用的[QAbstractScrollArea](qabstractscrollarea.html),例如,如果你決定要繼承[QAbstractItemView](qabstractitemview.html)。對于其中一個滑塊控件用于在給定范圍內獲得的值,其他大多數情況下[QSlider](qslider.html)類可能更適合您的需要。 | ![](https://img.kancloud.cn/e6/01/e601fb668599de38e7451795c0ab3cc6_169x186.png) | Scroll bars typically include four separate controls: a slider, scroll arrows, and a page control. * a. The slider provides a way to quickly go to any part of the document, but does not support accurate navigation within large documents. * b. The scroll arrows are push buttons which can be used to accurately navigate to a particular place in a document. For a vertical scroll bar connected to a text editor, these typically move the current position one "line" up or down, and adjust the position of the slider by a small amount. In editors and list boxes a "line" might mean one line of text; in an image viewer it might mean 20 pixels. * c. The page control is the area over which the slider is dragged (the scroll bar's background). Clicking here moves the scroll bar towards the click by one "page". This value is usually the same as the length of the slider. | 每個捲軸都有一個值,指示多遠滑塊是滾動條的開始,這是與獲得[value](qabstractslider.html#value-prop)( ),并設置用[setValue](qabstractslider.html#value-prop)( ) 。此值始終在滾動條中定義的值的范圍之內在于,從[minimum()](qabstractslider.html#minimum-prop)至[maximum()](qabstractslider.html#minimum-prop)包容性。可接受的值的范圍可以從被設置[setMinimum](qabstractslider.html#minimum-prop)()和[setMaximum](qabstractslider.html#maximum-prop)( ) 。在最小值時,滑塊(對于垂直滾動條)或左邊緣(對于水平滾動條)的頂部邊緣將在頂部(或左)滾動條的末端。在最大值,底部(或右)的滑塊的邊緣將在底部(或右)滾動條的末端。 滑塊的長度通常是關系到頁步長的值,并且通常表示在滾動視圖所示的文件區域的比例。在網頁的步驟是量,當用戶按下由值的變化**Page Up**和**Page Down**鍵,并且設置有[setPageStep](qabstractslider.html#pageStep-prop)( ) 。由行步中定義的值較小的更改,可使用光標鍵做,并且這個數量被設置[setSingleStep()](qabstractslider.html#singleStep-prop)。 注意,所使用的值的范圍是獨立的滾動條控件的實際尺寸。你不需要當您選擇的范圍和頁面步長值,以考慮到這一點。 滾動條中指定的值的范圍往往決定不同,以這些為[QSlider](qslider.html)因為需要將滑塊的長度來加以考慮。如果我們有一個100行的文件,我們只能顯示一個小部件20行,我們不妨來構造一個滾動條與20頁的步驟,為0的最小值, 80最大值。這將使我們有五個“頁面”一個滾動條。 | ![](https://img.kancloud.cn/58/7b/587bacb6f03ded99706e45b157907fde_250x175.png) | The relationship between a document length, the range of values used in a scroll bar, and the page step is simple in many common situations. The scroll bar's range of values is determined by subtracting a chosen page step from some value representing the length of the document. In such cases, the following equation is useful: _document length_ = [maximum](qabstractslider.html#maximum-prop)() - [minimum](qabstractslider.html#minimum-prop)() + [pageStep](qabstractslider.html#pageStep-prop)(). | QScrollBar只提供整數范圍。請注意,雖然QScrollBar處理非常大的數字,對當前屏幕上的滾動條不能有效地代表上述約10萬像素的范圍。除此之外,它變得難以為用戶控制使用鍵盤或鼠標的滑動件,和滾動箭頭將具有有限的使用。 滾動條繼承了一套完整的從信號[QAbstractSlider](qabstractslider.html): * [valueChanged()](qabstractslider.html#valueChanged) is emitted when the scroll bar's value has changed. The tracking() determines whether this signal is emitted during user interaction. * [rangeChanged()](qabstractslider.html#rangeChanged) is emitted when the scroll bar's range of values has changed. * [sliderPressed()](qabstractslider.html#sliderPressed) is emitted when the user starts to drag the slider. * [sliderMoved()](qabstractslider.html#sliderMoved) is emitted when the user drags the slider. * [sliderReleased()](qabstractslider.html#sliderReleased) is emitted when the user releases the slider. * [actionTriggered()](qabstractslider.html#actionTriggered) is emitted when the scroll bar is changed by user interaction or via the [triggerAction()](qabstractslider.html#triggerAction) function. 滾動條可以通過鍵盤來控制,但它有一個缺省[focusPolicy](qwidget.html#focusPolicy-prop)的( )[Qt.NoFocus](qt.html#FocusPolicy-enum)。使用[setFocusPolicy](qwidget.html#focusPolicy-prop)( )來啟用鍵盤交互使用滾動條: * Left/Right move a horizontal scroll bar by one single step. * Up/Down move a vertical scroll bar by one single step. * PageUp moves up one page. * PageDown moves down one page. * Home moves to the start (mininum). * End moves to the end (maximum). 滑動件本身可通過使用可控制的[triggerAction()](qabstractslider.html#triggerAction)函數來模擬使用滾動條控件的用戶交互。如果你有很多使用值的常見各種不同的部件,這是很有用的。 大多數的GUI風格使用[pageStep](qabstractslider.html#pageStep-prop)()值來計算滑塊的尺寸。 | ![Screenshot of a Macintosh style scroll bar](https://img.kancloud.cn/ea/0d/ea0d40ee16e0b12430df9e48324d9609_298x27.png) | A scroll bar shown in the [Macintosh widget style](index.htm). | | ![Screenshot of a Windows XP style scroll bar](https://img.kancloud.cn/2f/c1/2fc11e43bcc0584d5ebe60f8cb687374_312x29.png) | A scroll bar shown in the [Windows XP widget style](index.htm). | | ![Screenshot of a Plastique style scroll bar](https://img.kancloud.cn/72/28/722845b99f49589b2ef24394ded1b168_209x28.png) | A scroll bar shown in the [Plastique widget style](index.htm). | * * * ## Method Documentation ``` QScrollBar.__init__ (self, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個垂直滾動條。 該_parent_參數被發送到[QWidget](qwidget.html)構造函數。 該[minimum](qabstractslider.html#minimum-prop)缺省值為0 ,則[maximum](qabstractslider.html#maximum-prop)為99,用[singleStep](qabstractslider.html#singleStep-prop)1尺寸和[pageStep](qabstractslider.html#pageStep-prop)10的尺寸,和一個初始[value](qabstractslider.html#value-prop)0 。 ``` QScrollBar.__init__ (self, Qt.Orientation?orientation, QWidget?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個滾動條給定的_orientation_。 該_parent_參數被傳遞到[QWidget](qwidget.html)構造函數。 該[minimum](qabstractslider.html#minimum-prop)缺省值為0 ,則[maximum](qabstractslider.html#maximum-prop)為99,用[singleStep](qabstractslider.html#singleStep-prop)1尺寸和[pageStep](qabstractslider.html#pageStep-prop)10的尺寸,和一個初始[value](qabstractslider.html#value-prop)0 。 ``` QScrollBar.contextMenuEvent (self, QContextMenuEvent) ``` 從重新實現[QWidget.contextMenuEvent](qwidget.html#contextMenuEvent)( ) 。 ``` bool QScrollBar.event (self, QEvent?event) ``` 從重新實現[QObject.event](qobject.html#event)( ) 。 ``` QScrollBar.hideEvent (self, QHideEvent) ``` 從重新實現[QWidget.hideEvent](qwidget.html#hideEvent)( ) 。 ``` QScrollBar.initStyleOption (self, QStyleOptionSlider?option) ``` 初始化_option_與其它的值[QScrollBar](qscrollbar.html)。當他們需要一個這種方法是有用的子類[QStyleOptionSlider](qstyleoptionslider.html),但不希望在所有的信息填寫自己。 **See also** [QStyleOption.initFrom](qstyleoption.html#initFrom)( ) 。 ``` QScrollBar.mouseMoveEvent (self, QMouseEvent) ``` 從重新實現[QWidget.mouseMoveEvent](qwidget.html#mouseMoveEvent)( ) 。 ``` QScrollBar.mousePressEvent (self, QMouseEvent) ``` 從重新實現[QWidget.mousePressEvent](qwidget.html#mousePressEvent)( ) 。 ``` QScrollBar.mouseReleaseEvent (self, QMouseEvent) ``` 從重新實現[QWidget.mouseReleaseEvent](qwidget.html#mouseReleaseEvent)( ) 。 ``` QScrollBar.paintEvent (self, QPaintEvent) ``` 從重新實現[QWidget.paintEvent](qwidget.html#paintEvent)( ) 。 ``` QSize QScrollBar.sizeHint (self) ``` [](qsize.html) [從重新實現](qsize.html)[QWidget.sizeHint](qwidget.html#sizeHint-prop)( ) 。 ``` QScrollBar.sliderChange (self, QAbstractSlider.SliderChange?change) ``` 從重新實現[QAbstractSlider.sliderChange](qabstractslider.html#sliderChange)( ) 。
                  <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>

                              哎呀哎呀视频在线观看