--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# -*- coding: utf-8 -*-
import sys
from os.path import dirname, realpath, join
from PySide.QtGui import (QApplication, QVBoxLayout, QLabel, QPixmap,
QWidget)
from PySide import QtCore
class PlayTurntable(QWidget):
def __init__(self, images, mouse_threshold=50, parent=None):
super(PlayTurntable, self).__init__(parent)
self.label = QLabel()
self.label.setFixedWidth(300)
self.label.setFixedHeight(200)
layout = QVBoxLayout()
layout.addWidget(self.label)
self.setLayout(layout)
# init variables
self.tracking = False
self.mouse_start = 0
self.mouse_threshold = mouse_threshold
self.images = images
self.image_index = 0
self.pic = QPixmap(self.images[self.image_index])
self.label.setPixmap(self.pic.scaled(300, 200, QtCore.Qt.KeepAspectRatio))
self.installEventFilter(self)
def eventFilter(self, obj, event):
if event.type() == event.MouseButtonPress:
if event.button() == QtCore.Qt.LeftButton:
self.mouse_start = event.x()
self.tracking = True
event.accept()
if event.type() == event.MouseButtonRelease:
if event.button() == QtCore.Qt.LeftButton:
self.tracking = False
event.accept()
if event.type() == event.MouseMove:
if self.tracking:
mouse_x = event.x()
distance = self.mouse_start - mouse_x
if abs(distance) >= self.mouse_threshold:
self.mouse_start = mouse_x
if distance > 0:
self.frame_step(1)
else:
self.frame_step(-1)
event.accept()
return True
def frame_step(self, amount):
self.image_index += amount
if self.image_index >= len(self.images):
self.image_index = 0
elif self.image_index < 0:
self.image_index = len(self.images) - 1
print 'switching to: %s' % self.images[self.image_index]
self.pic.load(self.images[self.image_index])
self.label.setPixmap(
self.pic.scaled(300, 200, QtCore.Qt.KeepAspectRatio))
self.label.repaint()
if __name__=='__main__':
current_path = dirname(realpath(__file__))
images = ['turn1.jpg', 'turn2.jpg', 'turn3.jpg', 'turn4.jpg']
for index, value in enumerate(images):
images[index] = join(current_path, value)
app = QApplication(sys.argv)
PT = PlayTurntable(images)
PT.show()
sys.exit(app.exec_())
def eventFilter(self, obj, event):
if event.type() == event.MouseButtonPress:
if event.button() == QtCore.Qt.LeftButton:
self.mouse_start = event.x()
self.tracking = True
event.accept()
return True
if event.type() == event.MouseButtonRelease:
if event.button() == QtCore.Qt.LeftButton:
self.tracking = False
event.accept()
return True
if event.type() == event.MouseMove:
if self.tracking:
mouse_x = event.x()
distance = self.mouse_start - mouse_x
if abs(distance) >= self.mouse_threshold:
self.mouse_start = mouse_x
if distance > 0:
self.frame_step(1)
else:
self.frame_step(-1)
event.accept()
return True
return False
Using an event filter is a little heavy handed for what you’re trying to achieve, I think.
The problem with it is that every event, including draw events, passes through your event filter waiting for it to either block the event - return True
- or pass it through - return False
. And the number of events can be quite a lot - sometimes tens of thousands of events per second.
An alternative is to instead override mousePressEvent
, mouseReleaseEvent
and mouseMoveEvent
. That way you wouldn’t inadvertently interfere with events you aren’t interested in, and handling them would remain quick even as complexity increases.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d72dce4e-4833-4aa1-a7b9-d2fbe9ee9bb8%40googlegroups.com.
def mousePressEvent(self, event):
if event.button() == QtCore.Qt.LeftButton:
self.mouse_start = event.x()
self.tracking = True
def mouseReleaseEvent(self, event):
if event.button() == QtCore.Qt.LeftButton:
self.tracking = False
def mouseMoveEvent(self, event):
if self.tracking:
mouse_x = event.x()
distance = self.mouse_start - mouse_x
if abs(distance) >= self.mouse_threshold:
self.mouse_start = mouse_x
if distance > 0:
self.frame_step(1)
else:
self.frame_step(-1)
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You are most welcome.
in what instances would you want, or need, to do that?
If you’re inheriting from a class that already subclasses those, it’d be useful for when you want to add to the original behavior. Otherwise you’d be replacing it. For example, anyone inheriting from the class you’re just made may want to call that so as to still be able to get the scrubbing functionality.
Sometimes you may want to call it because the superclass has implemented something for it. For example, overriding the closeEvent
and not calling its superclass would override - and thus block - the GUI from closing. I’m not entirely sure when and why event handlers require this, so I make it a habit out of always calling it for Qt events.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d72dce4e-4833-4aa1-a7b9-d2fbe9ee9bb8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b498c554-8cbc-4b3e-9550-497170a627c5%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d72dce4e-4833-4aa1-a7b9-d2fbe9ee9bb8%40googlegroups.com.
Sometimes. In the case of closeEvent
, calling it would close the GUI I think so you’d probably want your code to run first. In general, it depends on whether you want something done before or after the superclass implementation. In your case, someone overriding your mouseMoveEvent
would have to decide whether the code should run before or after performing the scrubbing. Sometimes it doesn’t matter, sometimes it does.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d72dce4e-4833-4aa1-a7b9-d2fbe9ee9bb8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b498c554-8cbc-4b3e-9550-497170a627c5%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1361089a-d968-4088-9fb5-53ba42ccf898%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d72dce4e-4833-4aa1-a7b9-d2fbe9ee9bb8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b498c554-8cbc-4b3e-9550-497170a627c5%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1361089a-d968-4088-9fb5-53ba42ccf898%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAVMYnb-M3uZyfPuV4NXnwpsChQXgaGG%3DzKE7W2VHE2og%40mail.gmail.com.
def mouseMoveEvent(self, event):
if not self.tracking:
return
distance = self.mouse_start - event.x()
if distance >= self.mouse_threshold:
self.mouse_start = event.x()
self.frame_step(1)
elif distance <= -self.mouse_threshold:
self.mouse_start = event.x()
self.frame_step(-1)
Justin
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d72dce4e-4833-4aa1-a7b9-d2fbe9ee9bb8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b498c554-8cbc-4b3e-9550-497170a627c5%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1361089a-d968-4088-9fb5-53ba42ccf898%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
self.pic = QPixmap(self.images[self.image_index])
# self.label.setScaledContents(True)
# self.label.setPixmap(self.pic.scaled(300, 200, QtCore.Qt.KeepAspectRatio))
self.label.setPixmap(
self.pic.scaled(self.label.width(), self.label.height(), QtCore.Qt.KeepAspectRatio))
def resizeEvent(self, event):
self.label.setPixmap(
self.pic.scaled(self.label.width(), self.label.height(),
QtCore.Qt.KeepAspectRatio))
Thank you for your suggestion Justin. Did you mean the mouseMoveEvent method? Made some adjustments and is working as intended.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d0541c00-46a5-42da-9cef-36e66ae76813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d72dce4e-4833-4aa1-a7b9-d2fbe9ee9bb8%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b498c554-8cbc-4b3e-9550-497170a627c5%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1361089a-d968-4088-9fb5-53ba42ccf898%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAVMYnb-M3uZyfPuV4NXnwpsChQXgaGG%3DzKE7W2VHE2og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d693a6e7-34b3-4724-9281-03fdc6f39abf%40googlegroups.com.
Question on Pixmap resizing.I tried switching from fixed size to allow resizing.This is what I have at the moment and what happens is that I can increase my widget size,but it won't let me decrease. How should I approach this?
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/28081328-02ff-4d9a-b94b-77003355dbef%40googlegroups.com.
def resizeEvent(self, event):
self.label.setPixmap(
self.pic.scaled(self.label.width(), self.label.height(),
QtCore.Qt.KeepAspectRatio))
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/28081328-02ff-4d9a-b94b-77003355dbef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5cc87977-3e14-4c08-9b08-4125765feba9%40googlegroups.com.
if not images or not isinstance(images, list):
self.disable = True
self.images = [join(dirname(realpath(__file__)), 'mystery2.png')]
self.pic = QPixmap(self.images[self.image_index])
def paintEvent(self, event):
if self.disable:
painter = QPainter()
painter.begin(self)
painter.setOpacity(0.3)
painter.drawPixmap(0,0, self.pic)
painter.end()
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/28081328-02ff-4d9a-b94b-77003355dbef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/28081328-02ff-4d9a-b94b-77003355dbef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5cc87977-3e14-4c08-9b08-4125765feba9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0f4b69b5-2a4c-483e-8c94-1486441e72fe%40googlegroups.com.
# -*- coding: utf-8 -*-
import sys
from os.path import dirname, realpath, join
from PySide.QtGui import (QApplication, QVBoxLayout, QLabel, QPixmap, QWidget,
QPainter)
from PySide import QtCore
class ScrubbaleImageSequenceWidget(QWidget):
""" Exercize. A widget that users can scrub to play the turntable image
sequence.
Note: Try to pre-load the sequence into a list of pixmap?
Args:
images (str list): Full path to sequential images.
mouse_threshold (int): Scrub distance for image change.
Attributes:
disable (bool): stop the Widget from doing anything
tracking (bool): A switch to tell Widget when to track mouse movement.
mouse_start (float): Mouse starting X position.
image_index (int): Current index of image displaying.
image_opacity (float): Image opacity.
"""
def __init__(self, images = None, mouse_threshold=30, parent=None):
super(ScrubbaleImageSequenceWidget, self).__init__(parent)
self.images = images
self.mouse_threshold = mouse_threshold
self.disable = False
self.tracking = False
self.mouse_start = 0
self.image_index = 0
self.image_opacity = 1.0
self.setMinimumSize(100, 50)
self.resize(250, 200)
self.label = QLabel()
self.label.setAlignment(QtCore.Qt.AlignCenter)
layout = QVBoxLayout()
layout.setContentsMargins(10, 10, 10, 10)
layout.addWidget(self.label)
self.setLayout(layout)
if not images or not isinstance(images, list):
self.disable = True
self.image_opacity = 0.2
self.images = [join(dirname(realpath(__file__)), 'mystery2.png')]
self.pic = QPixmap(self.images[self.image_index])
def mousePressEvent(self, event):
if self.disable:
return
if event.button() == QtCore.Qt.LeftButton:
self.mouse_start = event.x()
self.tracking = True
print 'UI size ', self.width(), self.height()
print 'label size ', self.label.width(), self.label.height()
def mouseReleaseEvent(self, event):
if self.disable:
return
if event.button() == QtCore.Qt.LeftButton:
self.tracking = False
def mouseMoveEvent(self, event):
if self.disable:
return
if not self.tracking:
return
distance = self.mouse_start - event.x()
if distance >= self.mouse_threshold:
self.mouse_start = event.x()
self.frame_step(1)
elif distance <= -self.mouse_threshold:
self.mouse_start = event.x()
self.frame_step(-1)
def frame_step(self, amount):
# update and loop the image index
self.image_index += amount
if self.image_index >= len(self.images):
self.image_index = 0
elif self.image_index < 0:
self.image_index = len(self.images) - 1
self.pic.load(self.images[self.image_index])
self.repaint()
def paintEvent(self, event):
painter = QPainter()
painter.begin(self)
painter.setOpacity(self.image_opacity)
scaled_pic = self.pic.scaled(self.label.width(),
self.label.height(),
QtCore.Qt.KeepAspectRatio,
QtCore.Qt.SmoothTransformation,)
x_offset = (self.width() - scaled_pic.width()) / 2
y_offset = (self.height() - scaled_pic.height()) / 2
painter.drawPixmap(x_offset, y_offset, scaled_pic)
painter.end()
if __name__=='__main__':
current_path = dirname(realpath(__file__))
images = []
for i in range(1,8):
images.append('%s/turn%s.jpg' % (current_path, i))
app = QApplication(sys.argv)
# PT = ScrubbaleImageSequenceWidget(images)
PT = ScrubbaleImageSequenceWidget('random string')
PT.show()
sys.exit(app.exec_())
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/28081328-02ff-4d9a-b94b-77003355dbef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5cc87977-3e14-4c08-9b08-4125765feba9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
By the way I went with QPainter because it's the only way I could find how to control opacity. Is opacity possible if I use QPixmap?
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/015699b1-1b03-47d8-93b2-ed0551cd2ce8%40googlegroups.com.
environ['QT_API'] = 'pyside'
app = QApplication(sys.argv)
app.setStyleSheet(qdarkstyle.load_stylesheet())
SCRUB = ScrubbaleImageSequenceWidget(images)
# SCRUB = ScrubbaleImageSequenceWidget('random string')
SCRUB.show()
sys.exit(app.exec_())