• <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 閱讀(734) 評論(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.

            天天综合久久一二三区| 国产三级久久久精品麻豆三级| 日本欧美久久久久免费播放网| 久久AⅤ人妻少妇嫩草影院| 国内精品久久久久伊人av| 久久天天躁狠狠躁夜夜躁2O2O| 久久久久久久久波多野高潮| 精品久久久一二三区| 久久精品国产亚洲AV久| 一本一本久久aa综合精品| 中文字幕乱码人妻无码久久| 国产偷久久久精品专区| 伊人久久大香线蕉av不变影院| 中文字幕无码免费久久| 久久99精品久久久久久久久久| 成人久久综合网| 国产农村妇女毛片精品久久| 日批日出水久久亚洲精品tv| 国产偷久久久精品专区| 99久久超碰中文字幕伊人| 91久久精品视频| 伊人久久大香线蕉成人| 久久精品天天中文字幕人妻 | 久久只有这里有精品4| 久久夜色精品国产亚洲| 99久久无码一区人妻a黑| 久久激情亚洲精品无码?V| 精品久久久中文字幕人妻| 狠狠狠色丁香婷婷综合久久五月| 国产精品嫩草影院久久| 中文字幕久久久久人妻| 91精品国产91久久| 久久综合亚洲欧美成人| 久久久久久久综合日本| 奇米综合四色77777久久| 久久最近最新中文字幕大全| 波多野结衣久久一区二区| 青青草原综合久久| 伊人久久久AV老熟妇色| 久久免费99精品国产自在现线| 性做久久久久久久|