Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QtCore.Qt.FramelessWindowHint not working on my Windows machine ...

    Language Bindings
    1
    2
    1226
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Goffer
      Goffer last edited by

      Hi everybody !

      I ve wrote some code on a linux machine that runs fine but when I try to run it on my windows machine then it doesn't work as expected anymore.
      The Frameless flag closes my QMainWindow ...

      """."""
      from PySide import QtCore, QtGui
      
      
      class TabBar(QtGui.QTabBar):
      
          """Allow to drag a tab anywhere on the screen."""
      
          def __init__(self):
              """Initialize the class."""
              super(TabBar, self).__init__()
          # end def __init__
      
          def mousePressEvent(self, event):
              """."""
              index = self.tabAt(event.pos())
              self.tabContent = self.parent().widget(index)
      
              self.tabContent.setParent(None)
              self.tabContent.show()
              self.tabContent.move(QtGui.QCursor().pos())
      
              print self.tabContent.parent()
              self.tabContent.parent().setWindowFlags(QtCore.Qt.FramelessWindowHint)
              super(TabBar, self).mousePressEvent(event)
          # end def mousePressEvent
      
          def mouseMoveEvent(self, event):
              """."""
              print 'move'
              self.wid.tabContent(QtGui.QCursor().pos())
          # end def mouseMoveEvent
      
          def mouseReleaseEvent(self, event):
              """."""
              print 'release'
          # end def mouseReleaseEvent
      # end class TabBar
      
      
      

      Why is it not working on my windows machine ??

      Thx

      1 Reply Last reply Reply Quote 0
      • Goffer
        Goffer last edited by

        Okay, apparently I have to set Frameless BEFORE showing the window ...

        1 Reply Last reply Reply Quote 0
        • First post
          Last post