##### Python >= 3.4
import pathlib
from PyQt5.QtWidgets import QMainWindow,QApplication
from PyQt5 import QtCore
from PyQt5 import uic
# Python >= 3.4
import pathlib
from PyQt5.QtWidgets import QMainWindow,QApplication
from PyQt5 import QtCore
from PyQt5 import uic
class FirstUserClass(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
mod_path = pathlib.Path(__file__).parent
uic.loadUi(mod_path / "ui_files/FirstUser.ui", self)
#Prpiedades de la Ventana
self.setWindowFlag(QtCore.Qt.FramelessWindowHint)
if __name__ == "__main__":
app = QApplication([])
fcu = FirstUserClass()
fcu.show()
app.exec_()
##### Python < 3.4
import os
from PyQt5.QtWidgets import QMainWindow,QApplication
from PyQt5 import QtCore
from PyQt5 import uic
# Python < 3.4
import os
from PyQt5.QtWidgets import QMainWindow,QApplication
from PyQt5 import QtCore
from PyQt5 import uic
class FirstUserClass(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
mod_path = os.path.dirname(__file__)
uic.loadUi(os.path.join(mod_path, "ui_files/FirstUser.ui"), self)
#Prpiedades de la Ventana
self.setWindowFlag(QtCore.Qt.FramelessWindowHint)
if __name__ == "__main__":
app = QApplication([])
fcu = FirstUserClass()
fcu.show()
app.exec_()
##### Python >= 3.4
import inspect
import pathlib
# Python >= 3.4
import inspect
import pathlib
filename = inspect.getframeinfo(inspect.currentframe()).filename
mod_path = pathlib.Path(filename).resolve().parent
uic.loadUi(mod_path / "ui_files/FirstUser.ui", self)
##### Python < 3.4
import inspect
import os
# Python < 3.4
import inspect
import os
filename = inspect.getframeinfo(inspect.currentframe()).filename
mod_path = os.path.dirname(os.path.abspath(filename))
uic.loadUi(os.path.join(mod_path, "ui_files/FirstUser.ui"), self)