• <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 閱讀(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函數說明

            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久久精品国产综合一区| 97久久国产亚洲精品超碰热| 99久久国产热无码精品免费 | 2021国内久久精品| 人妻丰满AV无码久久不卡| 久久中文字幕一区二区| 热RE99久久精品国产66热| 欧美一区二区久久精品| 亚洲中文字幕无码一久久区| 久久美女网站免费| 欧美va久久久噜噜噜久久| 国产精品免费看久久久香蕉 | 国产美女亚洲精品久久久综合| 91精品国产高清91久久久久久| 欧美激情精品久久久久久久| 久久综合狠狠色综合伊人| 亚洲精品高清一二区久久| 72种姿势欧美久久久久大黄蕉| 天天做夜夜做久久做狠狠| 久久久久久久尹人综合网亚洲| 久久夜色精品国产亚洲| 欧美色综合久久久久久| 99久久人人爽亚洲精品美女| 久久久久久久人妻无码中文字幕爆 | 天天影视色香欲综合久久| 久久九九有精品国产23百花影院| 中文精品久久久久人妻不卡| 亚洲国产成人久久综合碰| 久久久WWW免费人成精品| 一本伊大人香蕉久久网手机| 1000部精品久久久久久久久| 久久久无码精品亚洲日韩按摩 | 久久精品国产只有精品66| 一级做a爱片久久毛片| 天天综合久久久网| 久久香蕉一级毛片| 久久免费视频网站| 88久久精品无码一区二区毛片 | 久久天堂电影网|