2018-02-15 17:28:01 +00:00
|
|
|
from qtpy import uic
|
2016-03-16 18:27:12 +00:00
|
|
|
import os.path
|
2017-01-11 16:00:00 +00:00
|
|
|
import paths
|
2018-02-15 17:28:01 +00:00
|
|
|
|
2016-03-16 18:27:12 +00:00
|
|
|
|
2016-03-24 09:49:03 +00:00
|
|
|
def resource_path(resFile):
|
2017-01-11 16:00:00 +00:00
|
|
|
baseDir = paths.codePath()
|
2018-02-15 17:28:01 +00:00
|
|
|
for subDir in ("ui", "bitmessageqt"):
|
|
|
|
path = os.path.join(baseDir, subDir, resFile)
|
|
|
|
if os.path.isfile(path):
|
|
|
|
return path
|
|
|
|
|
2016-03-16 18:27:12 +00:00
|
|
|
|
2016-03-24 09:49:03 +00:00
|
|
|
def load(resFile, widget):
|
|
|
|
uic.loadUi(resource_path(resFile), widget)
|