Commit dab5a262 authored by Martin Drechsler's avatar Martin Drechsler

Minor correction to make the code compatible to windows and linux.

parent f636b3b3
......@@ -10,7 +10,7 @@ from ADoutputs import daq_AO, daq_DO
from pyqtgraph.Qt import QtGui, QtCore
from PyQt5.QtCore import QBasicTimer
from PyQt5.QtWidgets import (QPushButton, QWidget, QVBoxLayout)
import os
#An example of a class
class anal_control_signal(QWidget):
......@@ -139,10 +139,11 @@ class activation_button(QWidget):
QWidget.__init__(self)
self.button = QPushButton('', self)
self.button.clicked.connect(self.handleButton)
self.button.setIcon(QtGui.QIcon('snuffles1.png'))
self.button.setIcon(QtGui.QIcon(os.path.dirname(os.path.realpath(__file__)) + "\\snuffles1.png"))
self.button.setIconSize(QtCore.QSize(48,48))
layout = QVBoxLayout(self)
layout.addWidget(self.button)
def handleButton(self):
self.button.setIcon(QtGui.QIcon('snuffles.png'))
\ No newline at end of file
self.button.setIcon(QtGui.QIcon(os.path.dirname(os.path.realpath(__file__))+ "\\snuffles.png"))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment