Skip to content

Commit

Permalink
Fixed the icon bug when not running the application from its directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza5 committed Sep 26, 2014
1 parent 4e8ed99 commit 1a0e521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bret-pyqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import re
from urllib.request import urlretrieve
from urllib.error import URLError
from os.path import join
from os.path import join, dirname, realpath

try :
from PyQt4.QtGui import QApplication, QWidget, QFileDialog, QMessageBox, QTextEdit, QStandardItem, QStandardItemModel, QAbstractItemView, QIcon, QMainWindow, QStatusBar
Expand Down Expand Up @@ -263,7 +263,7 @@ class MainWindow(QMainWindow):
def __init__(self):
super().__init__(parent=None)
self.setWindowTitle(__fullAppName__)
self.setWindowIcon(QIcon(join('GUI','BRET-128.png')))
self.setWindowIcon(QIcon(join(dirname(realpath(__file__)),'GUI','BRET-128.png')))
self.setCentralWidget(CentralWidget(self))
self.setStatusBar(QStatusBar(self))

Expand Down

0 comments on commit 1a0e521

Please sign in to comment.