Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-57

Make draggable QWebView inside a transparent QWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 1.1.0
    • PySide
    • None
    • Microsoft Windows 7

    Description

      Ok guys, I got this problem. I've a QWidget window set to transparent as follow:

      self.setAttribute(Qt.WA_TranslucentBackground)
      self.setWindowFlags(Qt.Tool | Qt.FramelessWindowHint)
      self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)

      Inside the QWidget there a QWebView. Now I want to make draggable the QWebView, but it don't wanna work. I wrote even these listeners:

      def mousePressEvent(self, event):
      if event.button() == QtCore.Qt.LeftButton:
      self.dragPosition = event.globalPos() - self.frameGeometry().topLeft()
      event.accept()

      def mouseMoveEvent(self, event):
      if event.buttons() == QtCore.Qt.LeftButton:
      self.move(event.globalPos() - self.dragPosition)
      event.accept()

      but nothing.

      Any suggestions?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            francext Francesco Trillini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes