Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. QtCore.Qt.FramelessWindowHint not working on my Windows machine ...
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Unsolved Language Bindings
2 Posts 1 Posters 1.5k Views
  • 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.
  • GofferG Offline
    GofferG Offline
    Goffer
    wrote on last edited by
    #1

    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
    0
    • GofferG Offline
      GofferG Offline
      Goffer
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved