PyBitmessage/src/bitmessageqt/widgets.py

15 lines
275 B
Python
Raw Normal View History

2016-03-16 19:27:12 +01:00
from PyQt4 import uic
import os.path
import sys
def resource_path(path):
try:
return os.path.join(sys._MEIPASS, path)
except:
return os.path.join(os.path.dirname(__file__), path)
def load(path, widget):
uic.loadUi(resource_path(path), widget)