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

            思思久久99热免费精品6| 久久精品国产亚洲欧美| 久久香蕉一级毛片| 日韩精品国产自在久久现线拍 | 97久久国产综合精品女不卡| 香蕉久久永久视频| 亚洲熟妇无码另类久久久| 国产精品久久国产精麻豆99网站| 久久久久久国产精品美女| 四虎国产精品成人免费久久| 国产成人精品久久二区二区| 久久精品无码一区二区app| 亚洲精品乱码久久久久久自慰| 99久久精品国产一区二区蜜芽| 久久久一本精品99久久精品88| 久久精品国产秦先生| 免费无码国产欧美久久18| 色偷偷888欧美精品久久久| 久久久久久免费视频| 久久久久99精品成人片牛牛影视| 久久久久国产精品嫩草影院| 狠狠色综合久久久久尤物| 91精品国产综合久久婷婷| 午夜福利91久久福利| 久久av免费天堂小草播放| 1000部精品久久久久久久久| 久久99热这里只频精品6| 精品久久久久久无码人妻热 | 一97日本道伊人久久综合影院| 9191精品国产免费久久| 午夜久久久久久禁播电影| 亚洲级αV无码毛片久久精品 | 91精品国产综合久久精品| 久久精品国产亚洲AV香蕉| 色综合久久精品中文字幕首页| 色综合久久中文字幕无码| 色综合久久久久综合体桃花网 | 99久久99久久久精品齐齐| 久久天天躁狠狠躁夜夜avapp| 99久久精品日本一区二区免费| 国产亚洲美女精品久久久久狼|