• <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 抓圖和截圖操作

            Posted on 2011-04-29 22:56 RTY 閱讀(1483) 評論(0)  編輯 收藏 引用 所屬分類: Qt 、Python
            1. 示例代碼
            self.originalPixmap = QtGui.QPixmap.grabWindow(QtGui.QApplication.desktop().winId())

            2.關(guān)于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.

            伊人久久综合成人网| 久久精品成人免费国产片小草 | 久久久久国产一区二区| 精品久久久久久久中文字幕| 久久久久亚洲精品男人的天堂| 少妇无套内谢久久久久| 国产成人精品免费久久久久| 国产亚洲欧美成人久久片| 色99久久久久高潮综合影院| AV狠狠色丁香婷婷综合久久| 久久夜色精品国产| 精品久久久久香蕉网| 一级做a爰片久久毛片毛片| 亚洲AV日韩精品久久久久| 久久夜色精品国产www| 久久精品国产亚洲av麻豆色欲| 日韩十八禁一区二区久久| 久久久久国产一级毛片高清版| 99久久99久久精品国产片果冻 | 久久这里都是精品| 伊人久久大香线焦综合四虎| 亚洲va久久久噜噜噜久久天堂| 久久国产香蕉一区精品| 免费精品99久久国产综合精品 | 99久久亚洲综合精品网站| 久久久久波多野结衣高潮| 久久国产乱子伦精品免费午夜| 久久久久久久99精品免费观看| 久久人爽人人爽人人片AV| 精品久久久久久久久免费影院| 久久久久国产日韩精品网站| 国产69精品久久久久9999| 97精品伊人久久久大香线蕉| 久久精品国产精品国产精品污| 97精品久久天干天天天按摩| 五月丁香综合激情六月久久| 伊人久久大香线蕉综合Av| 久久久久亚洲AV无码专区首JN| 免费无码国产欧美久久18| 亚洲欧洲久久av| 亚洲女久久久噜噜噜熟女|