2016-03-16 19:27:12 +01:00
|
|
|
from PyQt4 import uic
|
|
|
|
import os.path
|
2017-01-11 17:00:00 +01:00
|
|
|
import paths
|
2016-03-16 19:27:12 +01:00
|
|
|
import sys
|
|
|
|
|
2016-03-24 10:49:03 +01:00
|
|
|
def resource_path(resFile):
|
2017-01-11 17:00:00 +01:00
|
|
|
baseDir = paths.codePath()
|
2016-03-24 10:49:03 +01:00
|
|
|
for subDir in ["ui", "bitmessageqt"]:
|
|
|
|
if os.path.isdir(os.path.join(baseDir, subDir)) and os.path.isfile(os.path.join(baseDir, subDir, resFile)):
|
|
|
|
return os.path.join(baseDir, subDir, resFile)
|
2016-03-16 19:27:12 +01:00
|
|
|
|
2016-03-24 10:49:03 +01:00
|
|
|
def load(resFile, widget):
|
|
|
|
uic.loadUi(resource_path(resFile), widget)
|