astrodatagui: use relative imports for .ui file
import of custom widget only supported if run by main.py
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
from PyQt5 import QtWidgets, uic
|
from PyQt5 import QtWidgets, uic
|
||||||
|
import os
|
||||||
|
|
||||||
class AstrodataGUI(QtWidgets.QMainWindow):
|
class AstrodataGUI(QtWidgets.QMainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(AstrodataGUI, self).__init__()
|
super(AstrodataGUI, self).__init__()
|
||||||
uic.loadUi("astrodatagui.ui", self)
|
classFileDir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
absUiFilePath = os.path.join(classFileDir, "astrodatagui.ui")
|
||||||
|
uic.loadUi(absUiFilePath, self)
|
||||||
self.show()
|
self.show()
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
<customwidget>
|
<customwidget>
|
||||||
<class>FlaredetectorWidget</class>
|
<class>FlaredetectorWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>ui.FlaredetectorWidget</header>
|
<header>astrodatagui.ui.FlaredetectorWidget</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
Reference in New Issue
Block a user