From d39f8b79fad6b0442553f2e1d4b548205d58b879 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Wed, 17 Apr 2019 14:23:51 +0200 Subject: [PATCH] body has set better stretch factor and app can handle with clipboard --- pype/tools/standalonepublish/app.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pype/tools/standalonepublish/app.py b/pype/tools/standalonepublish/app.py index 099566c603..f39f553828 100644 --- a/pype/tools/standalonepublish/app.py +++ b/pype/tools/standalonepublish/app.py @@ -64,8 +64,8 @@ class Window(QtWidgets.QDialog): body.addWidget(widget_family) body.addWidget(widget_components) body.setStretchFactor(body.indexOf(widget_assets_wrap), 2) - body.setStretchFactor(body.indexOf(widget_family), 2) - body.setStretchFactor(body.indexOf(widget_components), 3) + body.setStretchFactor(body.indexOf(widget_family), 3) + body.setStretchFactor(body.indexOf(widget_components), 5) layout = QtWidgets.QVBoxLayout(self) layout.addWidget(body) @@ -124,6 +124,12 @@ class Window(QtWidgets.QDialog): self.widget_family.change_asset(self.NOT_SELECTED) self.widget_family.on_data_changed() + def keyPressEvent(self, event): + if event.key() == QtCore.Qt.Key_V and event.modifiers() == QtCore.Qt.ControlModifier: + clip = QtWidgets.QApplication.clipboard() + self.widget_components.process_mime_data(clip) + super().keyPressEvent(event) + def validation(self): if not self.initialized: return