Skip to content

Commit 59ccf09

Browse files
Merged in PhyNerd/Qt5 (Pull request #18)
2 parents 2f9a70c + 7947745 commit 59ccf09

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

Camera.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,9 @@ def generate_code(self, hdf5_file):
126126

127127

128128
import os
129-
import sys
130129

131-
if 'PySide' in sys.modules.copy():
132-
from PySide.QtCore import *
133-
from PySide.QtGui import *
134-
else:
135-
from PyQt4.QtCore import *
136-
from PyQt4.QtGui import *
130+
from qtutils.qt.QtCore import *
131+
from qtutils.qt.QtGui import *
137132

138133
from blacs.tab_base_classes import Worker, define_state
139134
from blacs.tab_base_classes import MODE_MANUAL, MODE_TRANSITION_TO_BUFFERED, MODE_TRANSITION_TO_MANUAL, MODE_BUFFERED

PulseBlaster.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -580,15 +580,10 @@ def add_device(self, device):
580580
from qtutils import UiLoader
581581
import qtutils.icons
582582
import os
583-
import sys
584583

585584
# We can't import * from QtCore & QtGui, as one of them has a function called bin() which overrides the builtin, which is used in the pulseblaster worker
586-
if 'PySide' in sys.modules.copy():
587-
from PySide import QtCore
588-
from PySide import QtGui
589-
else:
590-
from PyQt4 import QtCore
591-
from PyQt4 import QtGui
585+
from qtutils.qt import QtCore
586+
from qtutils.qt import QtGui
592587

593588

594589

PulseBlaster_No_DDS.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,11 @@ def generate_code(self, hdf5_file):
8080
from qtutils import UiLoader
8181
import qtutils.icons
8282
import os
83-
import sys
8483

8584
# We can't import * from QtCore & QtGui, as one of them has a function called bin() which overrides the builtin, which is used in the pulseblaster worker
86-
if 'PySide' in sys.modules.copy():
87-
from PySide import QtCore
88-
from PySide import QtGui
89-
else:
90-
from PyQt4 import QtCore
91-
from PyQt4 import QtGui
85+
from qtutils.qt import QtCore
86+
from qtutils.qt import QtGui
87+
from qtutils.qt import QtWidgets
9288

9389
@BLACS_tab
9490
class Pulseblaster_No_DDS_Tab(DeviceTab):

0 commit comments

Comments
 (0)