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

            久久精品二区| 久久艹国产| 久久精品天天中文字幕人妻| 亚洲av日韩精品久久久久久a | 91精品国产色综久久| 久久久久久久综合日本亚洲| 久久激情亚洲精品无码?V| 久久精品国产久精国产果冻传媒 | 久久亚洲中文字幕精品一区| 久久国产精品视频| 久久精品人人槡人妻人人玩AV| 久久偷看各类wc女厕嘘嘘| 乱亲女H秽乱长久久久| 国产伊人久久| 久久久精品人妻一区二区三区四| 欧美激情精品久久久久| 亚洲国产精品嫩草影院久久| 国产精品毛片久久久久久久| 久久午夜福利无码1000合集| 青青草原1769久久免费播放| 亚洲精品无码专区久久久| 精品久久久久久无码免费| 久久国产乱子伦免费精品| 精品国产乱码久久久久软件 | 久久精品国产WWW456C0M| 久久久久久亚洲Av无码精品专口| 香蕉aa三级久久毛片| 大伊人青草狠狠久久| 青草国产精品久久久久久| 亚洲国产成人精品91久久久| 97久久精品人人澡人人爽| 久久久久人妻精品一区二区三区| 狠狠色狠狠色综合久久| 亚洲欧美国产日韩综合久久| 久久丝袜精品中文字幕| 久久天天躁狠狠躁夜夜2020| 狠狠色综合网站久久久久久久| 精品午夜久久福利大片| 97久久综合精品久久久综合| 国产成人精品久久| 伊人久久大香线蕉综合影院首页|