In your UIfile.py
self.setWindowFlag(QtCore.Qt.WindowType.FramelessWindowHint).
Also, in your backend file you must create
QSizeGrip(some_obj)
where some_obj is any object (frame, dutton or etc) for expanding your window, write this inside init().
Also you must write in your backend file inside your Class this:
def move_window(e): # inside __init__()
"""Drag your window"""
if e.buttons() == QtCore.Qt.MouseButton.LeftButton:
try:
self.move(self.pos() + e.globalPosition().toPoint() - self.clickPosition)
self.clickPosition = e.globalPosition().toPoint()
e.accept()
except AttributeError:
pass
def mousePressEvent(self, e): # inside class
self.clickPosition = e.globalPosition().toPoint()
and
self.some_obj.mouseMoveEvent = move_window # inside init()
Written for PySide6, can be adapted for PyQt