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

            欧美黑人激情性久久| 久久这里只精品国产99热| 久久人人爽人人爽人人片AV麻豆| 嫩草影院久久国产精品| 一本色道久久综合| 好久久免费视频高清| 欧美色综合久久久久久| 精品久久久久久中文字幕人妻最新| 99久久精品国产一区二区| 精品熟女少妇AV免费久久| 91久久福利国产成人精品| 中文字幕日本人妻久久久免费 | 久久久久中文字幕| 久久精品极品盛宴观看| 国产精品xxxx国产喷水亚洲国产精品无码久久一区 | 奇米综合四色77777久久| 精品久久久久久国产91| 亚洲国产精品无码久久久不卡| 久久国产综合精品五月天| 狠狠干狠狠久久| 亚洲av伊人久久综合密臀性色| 久久激情五月丁香伊人| 99国内精品久久久久久久| 精品久久久久久中文字幕| 久久久久久久人妻无码中文字幕爆| 亚洲精品成人网久久久久久| 亚洲国产成人久久精品影视 | 综合久久一区二区三区| 久久久99精品一区二区| 国产亚洲色婷婷久久99精品91| 久久精品a亚洲国产v高清不卡| 久久婷婷五月综合97色直播| 久久亚洲精品国产亚洲老地址 | 久久久久国产精品熟女影院| 久久精品国产亚洲AV久| 国产精品久久久久久久久软件 | 久久久久免费视频| 日本欧美国产精品第一页久久| 久久久久这里只有精品| 中文精品99久久国产| 中文成人无码精品久久久不卡 |