• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 319, comments - 22, trackbacks - 0, articles - 11
              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

            PyQt 標簽設置圖片

            Posted on 2011-04-29 23:02 RTY 閱讀(742) 評論(0)  編輯 收藏 引用 所屬分類: QtPython
            1. 示例代碼

            1        self.screenshotLabel.setPixmap(self.originalPixmap.scaled(
            2                self.screenshotLabel.size(), QtCore.Qt.KeepAspectRatio,
            3                QtCore.Qt.SmoothTransformation))

            2. Label 的 setPixmap函數說明

            pixmap : QPixmap

            This property holds the label's pixmap.

            If no pixmap has been set this will return 0.

            Setting the pixmap clears any previous content. The buddy shortcut, if any, is disabled.

            Access functions:

            const QPixmap * pixmap () const
            void setPixmap ( const QPixmap & )

            3. 對QPixmap的scaled函數的解析

            QPixmap QPixmap::scaled ( const QSize & size, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationModetransformMode = Qt::FastTransformation ) const

            Scales the pixmap to the given size, using the aspect ratio and transformation modes specified by aspectRatioMode and transformMode.

            • If aspectRatioMode is Qt::IgnoreAspectRatio, the pixmap is scaled to size.
            • If aspectRatioMode is Qt::KeepAspectRatio, the pixmap is scaled to a rectangle as large as possible inside size, preserving the aspect ratio.
            • If aspectRatioMode is Qt::KeepAspectRatioByExpanding, the pixmap is scaled to a rectangle as small as possible outside size, preserving the aspect ratio.

            If the given size is empty, this function returns a null pixmap.

            In some cases it can be more beneficial to draw the pixmap to a painter with a scale set rather than scaling the pixmap. This is the case when the painter is for instance based on OpenGL or when the scale factor changes rapidly.

            See also isNull() and Pixmap Transformations.

            QPixmap QPixmap::scaled ( int width, int height, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationModetransformMode = Qt::FastTransformation ) const

            This is an overloaded function.

            Returns a copy of the pixmap scaled to a rectangle with the given width and height according to the given aspectRatioMode and transformMode.

            If either the width or the height is zero or negative, this function returns a null pixmap.

            日韩精品无码久久久久久| 国内精品免费久久影院| 久久久精品国产免大香伊| 久久久www免费人成精品| 久久精品国产亚洲AV嫖农村妇女| aaa级精品久久久国产片| 久久无码一区二区三区少妇| 7777精品久久久大香线蕉| 四虎国产精品免费久久久| 亚洲愉拍99热成人精品热久久| 国产精品永久久久久久久久久| 久久综合亚洲鲁鲁五月天| 国内精品久久久久久久coent| 久久天天躁狠狠躁夜夜avapp| 亚洲国产精品成人久久蜜臀 | 色偷偷久久一区二区三区| 99久久精品免费看国产一区二区三区 | 欧美久久亚洲精品| 热99re久久国超精品首页| 少妇高潮惨叫久久久久久| 亚洲美日韩Av中文字幕无码久久久妻妇 | a高清免费毛片久久| 亚洲色婷婷综合久久| 亚洲?V乱码久久精品蜜桃| 亚洲狠狠久久综合一区77777| 国产欧美一区二区久久| 久久久久久久97| 久久久亚洲欧洲日产国码是AV| 久久久久无码精品国产app| 国产欧美久久久精品影院| 亚洲国产精品嫩草影院久久| 久久九九免费高清视频| 国产免费久久久久久无码| 99久久99久久精品国产| 国产成人精品久久| 久久久久亚洲AV成人网人人网站 | 久久久WWW成人| 狠狠色丁香婷婷久久综合| 久久人人爽人人爽人人av东京热| 一本久道久久综合狠狠爱| 亚洲av成人无码久久精品|