• <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++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

            PyQt 標(biāo)簽設(shè)置圖片

            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函數(shù)說明

            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函數(shù)的解析

            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.

            久久91综合国产91久久精品| 日本欧美国产精品第一页久久| 久久久WWW成人免费毛片| 久久99国产综合精品女同| 午夜久久久久久禁播电影| 久久天天躁夜夜躁狠狠| 色青青草原桃花久久综合| 精品国产日韩久久亚洲| 欧美va久久久噜噜噜久久| 国产69精品久久久久9999APGF | av午夜福利一片免费看久久| 中文字幕无码精品亚洲资源网久久| 久久精品国产男包| 三上悠亚久久精品| 伊人丁香狠狠色综合久久| 国产99久久久国产精品~~牛| 久久亚洲精品无码播放| 久久只有这里有精品4| 午夜精品久久久久久毛片| 国内精品久久人妻互换| 亚洲国产精品久久久久网站| 久久精品国产精品亚洲人人 | 欧美国产成人久久精品| 国产69精品久久久久久人妻精品| 久久久久人妻精品一区| 亚洲欧美日韩精品久久| 久久亚洲精品成人av无码网站| 精品久久综合1区2区3区激情| 精品久久久噜噜噜久久久| 亚洲狠狠婷婷综合久久蜜芽| 一本色道久久综合| 亚洲va久久久久| 亚洲另类欧美综合久久图片区| 久久久久国产精品三级网| 久久99精品久久久久久噜噜| 亚洲精品高清国产一久久| 久久青草国产精品一区| 国产69精品久久久久99| 精品久久久久久无码人妻蜜桃| 久久99久久99小草精品免视看| 久久99热狠狠色精品一区|