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

            嫩草影院久久国产精品| 中文字幕精品久久久久人妻| 精品久久久噜噜噜久久久| 2021少妇久久久久久久久久| 亚洲国产成人久久精品影视| 青青草原综合久久大伊人导航| 久久人人爽人人爽人人av东京热| 国内精品伊人久久久久av一坑| 国产99久久九九精品无码| 丁香五月综合久久激情| 久久综合九色欧美综合狠狠| 久久久久无码精品| 国产人久久人人人人爽| 免费一级做a爰片久久毛片潮| 久久国产欧美日韩精品| 久久久国产视频| 久久久久亚洲AV无码去区首| 成人妇女免费播放久久久| 免费精品国产日韩热久久| 久久免费的精品国产V∧| 久久亚洲国产成人精品无码区| 狠狠色综合网站久久久久久久 | 久久噜噜久久久精品66| 久久久久久亚洲精品成人| 色婷婷狠狠久久综合五月| 国产成人精品久久| 国产ww久久久久久久久久| 国产精品亚洲综合专区片高清久久久| 久久精品亚洲中文字幕无码麻豆| 国产一区二区久久久| 狠狠色丁香久久婷婷综合_中| 色婷婷久久久SWAG精品| 久久天天躁狠狠躁夜夜2020一 | 久久久久99精品成人片| A级毛片无码久久精品免费| 99热热久久这里只有精品68| 国产成人99久久亚洲综合精品| 国产精品VIDEOSSEX久久发布| 精品久久人人做人人爽综合| 国产精品成人精品久久久| 国产亚洲精午夜久久久久久|