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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # QStylePainter Class Reference ## [[QtGui](index.htm) module] 該QStylePainter類是一個方便的類用于繪圖[QStyle](qstyle.html)窗口小部件中的元素。[More...](#details) 繼承[QPainter](qpainter.html)。 ### Methods * `__init__ (self)` * `__init__ (self, QWidget?w)` * `__init__ (self, QPaintDevice?pd, QWidget?w)` * `bool begin (self, QWidget?w)` * `bool begin (self, QPaintDevice?pd, QWidget?w)` * `drawComplexControl (self, QStyle.ComplexControl?cc, QStyleOptionComplex?opt)` * `drawControl (self, QStyle.ControlElement?ce, QStyleOption?opt)` * `drawItemPixmap (self, QRect?r, int?flags, QPixmap?pixmap)` * `drawItemText (self, QRect?rect, int?flags, QPalette?pal, bool?enabled, QString?text, QPalette.ColorRole?textRole?=?QPalette.NoRole)` * `drawPrimitive (self, QStyle.PrimitiveElement?pe, QStyleOption?opt)` * `QStyle style (self)` * * * ## Detailed Description 該QStylePainter類是一個方便的類用于繪圖[QStyle](qstyle.html)窗口小部件中的元素。 QStylePainter延伸[QPainter](qpainter.html)用一組高級別`draw...()`之上實現的功能[QStyle](qstyle.html)的API 。使用QStylePainter的優點在于,在參數列表獲得相當短。而一個[QStyle](qstyle.html)對象必須能夠借鑒使用任何畫家的任何小部件(因為應用程序通常有一個[QStyle](qstyle.html)對象由所有部件共享) ,一個QStylePainter與一個插件初始化,而無需指定[QWidget](qwidget.html)時,[QPainter](qpainter.html)和[QStyle](qstyle.html)對于每個函數調用。 使用示例[QStyle](qstyle.html)直接: ``` void MyWidget.paintEvent([QPaintEvent](qpaintevent.html) * /* event */) { [QPainter](qpainter.html) painter(this); [QStyleOptionFocusRect](qstyleoptionfocusrect.html) option; option.initFrom(this); option.backgroundColor = palette().color([QPalette](qpalette.html).Background); style()->drawPrimitive([QStyle](qstyle.html).PE_FrameFocusRect, &option, &painter, this); } ``` 例如,使用QStylePainter : ``` void MyWidget.paintEvent([QPaintEvent](qpaintevent.html) * /* event */) { QStylePainter painter(this); [QStyleOptionFocusRect](qstyleoptionfocusrect.html) option; option.initFrom(this); option.backgroundColor = palette().color([QPalette](qpalette.html).Background); painter.drawPrimitive([QStyle](qstyle.html).PE_FrameFocusRect, option); } ``` * * * ## Method Documentation ``` QStylePainter.__init__ (self) ``` 構造一個[QStylePainter](qstylepainter.html)。 ``` QStylePainter.__init__ (self, QWidget?w) ``` 構建[QStylePainter](qstylepainter.html)使用小工具_widget_它的漆設備。 ``` QStylePainter.__init__ (self, QPaintDevice?pd, QWidget?w) ``` 構建[QStylePainter](qstylepainter.html) using _pd_其油漆設備,然后從屬性_widget_。 ``` bool QStylePainter.begin (self, QWidget?w) ``` 開始繪制操作上的指定_widget_。返回True如果畫家是準備使用,否則返回False 。 這是通過采用一個構造函數自動調用[QWidget](qwidget.html)。 ``` bool QStylePainter.begin (self, QPaintDevice?pd, QWidget?w) ``` 這是一個重載函數。 開始繪制操作繪圖設備上_pd_就好像它是_widget_。 這是通過采用一個構造函數自動調用[QPaintDevice](qpaintdevice.html)和[QWidget](qwidget.html)。 ``` QStylePainter.drawComplexControl (self, QStyle.ComplexControl?cc, QStyleOptionComplex?opt) ``` 使用widget的樣式來繪制復雜的控制_cc_由指定的[QStyleOptionComplex](qstyleoptioncomplex.html) _option_。 **See also** [QStyle.drawComplexControl](qstyle.html#drawComplexControl)( ) 。 ``` QStylePainter.drawControl (self, QStyle.ControlElement?ce, QStyleOption?opt) ``` 使用widget的樣式來繪制控制元件_ce_通過指定[QStyleOption](qstyleoption.html) _option_。 **See also** [QStyle.drawControl](qstyle.html#drawControl)( ) 。 ``` QStylePainter.drawItemPixmap (self, QRect?r, int?flags, QPixmap?pixmap) ``` 繪制_pixmap_在矩形_rect_。像素圖是根據對準的_flags_。 **See also** [QStyle.drawItemPixmap](qstyle.html#drawItemPixmap)()和[Qt.Alignment](qt.html#AlignmentFlag-enum)。 ``` QStylePainter.drawItemText (self, QRect?rect, int?flags, QPalette?pal, bool?enabled, QString?text, QPalette.ColorRole?textRole?=?QPalette.NoRole) ``` 繪制_text_在矩形_rect_和調色板_pal_。該文本是根據對齊和包裹_flags_。 筆的顏色是指定_textRole_。該_enabled_布爾值指示是否該項目被啟用,當重新實現這個布爾應該如何影響該項目的結論。 **See also** [QStyle.drawItemText](qstyle.html#drawItemText)()和[Qt.Alignment](qt.html#AlignmentFlag-enum)。 ``` QStylePainter.drawPrimitive (self, QStyle.PrimitiveElement?pe, QStyleOption?opt) ``` 使用widget的樣式來繪制一個本原元_pe_通過指定[QStyleOption](qstyleoption.html) _option_。 **See also** [QStyle.drawPrimitive](qstyle.html#drawPrimitive)( ) 。 ``` QStyle QStylePainter.style (self) ``` [](qstyle.html) [返回所使用的當前樣式](qstyle.html)[QStylePainter](qstylepainter.html)。
                  <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>

                              哎呀哎呀视频在线观看