• <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++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

            PyQt 標(biāo)簽設(shè)置圖片

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

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

            2. Label 的 setPixmap函數(shù)說明

            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函數(shù)的解析

            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.

            99久久久精品免费观看国产| 久久无码国产专区精品| 久久精品免费一区二区三区| 国产—久久香蕉国产线看观看| 欧美亚洲另类久久综合婷婷| 日本久久久久亚洲中字幕| 品成人欧美大片久久国产欧美| 日本欧美国产精品第一页久久| 亚洲狠狠婷婷综合久久蜜芽| 亚洲国产精品久久| 久久综合香蕉国产蜜臀AV| 日本亚洲色大成网站WWW久久| 国产精品9999久久久久| 无码任你躁久久久久久老妇 | 久久精品天天中文字幕人妻| 99久久精品国产一区二区蜜芽| 欧美亚洲国产精品久久| 久久综合九色综合精品| 久久久精品人妻一区二区三区蜜桃| 精品久久久久久无码人妻热 | 久久精品久久久久观看99水蜜桃| 亚洲国产精品久久66| 久久精品午夜一区二区福利| 久久影院亚洲一区| 国产亚洲成人久久| 99久久精品国产免看国产一区| 久久精品国产亚洲av麻豆图片 | 无码精品久久一区二区三区| 精品国产福利久久久| 性欧美丰满熟妇XXXX性久久久 | 久久精品亚洲乱码伦伦中文 | 日韩亚洲国产综合久久久| 精品国产青草久久久久福利 | 久久最新免费视频| 久久亚洲中文字幕精品一区四 | 久久人人爽人人爽人人片AV东京热 | 成人精品一区二区久久| 国产午夜福利精品久久| 亚洲嫩草影院久久精品| 国产免费福利体检区久久| 91精品国产高清久久久久久国产嫩草|