• <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 22:56 RTY 閱讀(1483) 評論(0)  編輯 收藏 引用 所屬分類: Qt 、Python
            1. 示例代碼
            self.originalPixmap = QtGui.QPixmap.grabWindow(QtGui.QApplication.desktop().winId())

            2.關于QPixmap類的grabWIndow

            QPixmap QPixmap::grabWindow ( WId window, int x = 0, int y = 0, int width = -1, int height = -1 ) [static]

            Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect(x, y, width, height).

            The arguments (x, y) specify the offset in the window, whereas (width, height) specify the area to be copied. If width is negative, the function copies everything to the right border of the window. If height is negative, the function copies everything to the bottom of the window.

            The window system identifier (WId) can be retrieved using the QWidget::winId() function. The rationale for using a window identifier and not a QWidget, is to enable grabbing of windows that are not part of the application, window system frames, and so on.

            The grabWindow() function grabs pixels from the screen, not from the window, i.e. if there is another window partially or entirely over the one you grab, you get pixels from the overlying window, too. The mouse cursor is generally not grabbed.

            Note on X11 that if the given window doesn't have the same depth as the root window, and another window partially or entirely obscures the one you grab, you will not get pixels from the overlying window. The contents of the obscured areas in the pixmap will be undefined and uninitialized.

            On Windows Vista and above grabbing a layered window, which is created by setting the Qt::WA_TranslucentBackground attribute, will not work. Instead grabbing the desktop widget should work.

            Warning: In general, grabbing an area outside the screen is not safe. This depends on the underlying window system.

            色婷婷综合久久久久中文一区二区| 久久久91精品国产一区二区三区| 久久久久久免费视频| 亚洲va久久久噜噜噜久久 | 中文字幕日本人妻久久久免费 | 久久精品成人免费国产片小草| 久久人人爽人人爽人人片AV麻豆| 久久久www免费人成精品| 久久夜色精品国产亚洲| 精品视频久久久久| 无遮挡粉嫩小泬久久久久久久| 91亚洲国产成人久久精品| 欧美国产成人久久精品| 97久久精品人人澡人人爽| 久久亚洲精品国产精品婷婷| 久久国产精品一区二区| 久久婷婷五月综合成人D啪| 国产精品嫩草影院久久| 亚洲av伊人久久综合密臀性色 | 久久人人爽人人爽人人爽| 77777亚洲午夜久久多喷| 亚洲欧洲久久久精品| 狠狠色综合久久久久尤物| 91精品国产91久久综合| 久久亚洲欧美国产精品| 97久久国产露脸精品国产| 久久亚洲色一区二区三区| 91精品国产高清久久久久久91| 久久婷婷五月综合97色| 久久九九兔免费精品6| 亚洲国产成人久久笫一页| 久久精品成人影院| 久久久精品免费国产四虎| 99久久人妻无码精品系列蜜桃 | 久久久精品午夜免费不卡| A狠狠久久蜜臀婷色中文网| 久久精品国产清高在天天线| 麻豆成人久久精品二区三区免费| 久久久久人妻一区二区三区| 久久人与动人物a级毛片| 99久久这里只精品国产免费|