def _create_UI(self): QtWidgets.QVBoxLayout(self) o = common.MARGIN() self.layout().setContentsMargins(o, o, o, o) self.layout().setSpacing(common.INDICATOR_WIDTH()) height = common.ROW_HEIGHT() * 0.7 row = common_ui.add_row(None, height=height, padding=None, parent=self) self.channel_button = common_ui.ClickableIconButton( u'slack', (common.TEXT, common.TEXT), height, ) label = common_ui.PaintedLabel(u'Send Message', size=common.LARGE_FONT_SIZE(), parent=row) label.setFixedHeight(height) self.hide_button = common_ui.ClickableIconButton( u'close', (common.REMOVE, common.REMOVE), height, parent=row) row.layout().addWidget(label, 0) row.layout().addStretch(1) row.layout().addWidget(self.channel_button, 0) row.layout().addWidget(self.hide_button, 0) self.message_widget = MessageWidget(self.token, parent=self) self.layout().addSpacing(o * 0.5) self.layout().addWidget(self.message_widget) self.send_button = common_ui.PaintedButton(u'Send', parent=self) self.layout().addSpacing(o) self.layout().addWidget(self.send_button) self.layout().addSpacing(o * 0.5)
def _create_UI(self): QtWidgets.QVBoxLayout(self) o = common.MARGIN() self.layout().setContentsMargins(o, o * 0.5, o, o) self.layout().setSpacing(0) row = common_ui.add_row(None, padding=None, parent=self) self.hide_button = common_ui.ClickableIconButton( u'close', (common.REMOVE, common.REMOVE), common.ROW_HEIGHT() * 0.6) label = common_ui.PaintedLabel(u'Preferences', size=common.LARGE_FONT_SIZE()) row.layout().addWidget(label, 0) row.layout().addStretch(1) row.layout().addWidget(self.hide_button, 0) self.hide_button.clicked.connect( lambda: self.done(QtWidgets.QDialog.Rejected)) splitter = QtWidgets.QSplitter(parent=self) self.layout().addWidget(splitter) self.sections_list_widget = SectionSwitcherWidget(parent=self) splitter.addWidget(self.sections_list_widget) scroll_area = QtWidgets.QScrollArea(parent=self) scroll_area.setWidgetResizable(True) splitter.addWidget(scroll_area) self.sections_stack_widget = SectionsStackWidget(parent=self) scroll_area.setWidget(self.sections_stack_widget)
def add_section(label, description, data): """Utility method for creating the layout needed to edit default paths.""" height = common.ROW_HEIGHT() * 0.8 o = common.MARGIN() grp = common_ui.get_group(parent=self) grp.layout().setContentsMargins(o, o, o, o) grp.layout().setSpacing(0) label = common_ui.PaintedLabel(label, size=common.LARGE_FONT_SIZE(), parent=self) grp.layout().addWidget(label) grp.layout().addSpacing(o) if description: common_ui.add_description(description, label=None, parent=grp) grp.layout().addSpacing(o) scroll_area = QtWidgets.QScrollArea(parent=self) scroll_area.setWidgetResizable(True) scroll_area.setMaximumHeight(common.HEIGHT() * 0.66) scroll_area.setAttribute(QtCore.Qt.WA_NoBackground) scroll_area.setAttribute(QtCore.Qt.WA_TranslucentBackground) grp.layout().addWidget(scroll_area) _row = common_ui.add_row(None, vertical=True, padding=None, height=None, parent=grp) _row.layout().setContentsMargins(0, 0, 0, 0) _row.layout().setSpacing(0) scroll_area.setWidget(_row) for k, v in sorted(data.items()): label = u'<span style="color:rgba({ADD});">{k}</span> - {v}:'.format( ADD=common.rgb(common.ADD), k=k.upper(), v=v[u'description']) row = common_ui.add_row(None, padding=None, height=height, parent=_row) common_ui.add_description(label, label=u'', parent=row) row = common_ui.add_row(None, padding=None, height=height, parent=_row) line_edit = common_ui.add_line_edit(v[u'default'], parent=row) line_edit.setAlignment(QtCore.Qt.AlignLeft) line_edit.setText(v[u'value']) line_edit.textChanged.connect( functools.partial(text_changed, data, k))
def _create_UI(self): QtWidgets.QVBoxLayout(self) o = common.MARGIN() self.layout().setContentsMargins(o, o, o, o) self.layout().setSpacing(o) row = common_ui.add_row(u'', parent=self) self.hide_button = common_ui.ClickableIconButton( u'close', (common.REMOVE, common.REMOVE), common.MARGIN(), description=u'Hide', parent=row) bookmark = u'{}/{}/{}'.format(self.server, self.job, self.root) source = images.get_thumbnail_path(self.server, self.job, self.root, bookmark) pixmap = images.ImageCache.get_pixmap(source, row.height()) if not pixmap: source = images.get_placeholder_path( bookmark, fallback=u'thumb_bookmark_gray') pixmap = images.ImageCache.get_pixmap(source, row.height()) if pixmap: thumbnail = QtWidgets.QLabel(parent=self) thumbnail.setPixmap(pixmap) row.layout().addWidget(thumbnail, 0) row.layout().addSpacing(o * 0.5) text = u'{} | {}'.format(self.job.upper(), self.root.upper()) label = common_ui.PaintedLabel(text, size=common.LARGE_FONT_SIZE()) row.layout().addWidget(label) row.layout().addStretch(1) row.layout().addWidget(self.hide_button, 0) # ***************************************** self.templates_widget = managebookmarks.TemplatesWidget(u'asset', parent=self) self.layout().addWidget(self.templates_widget, 1) s = u'Independent of the template, basic <span style="color:rgba({ADD});">mode</span> and \ <span style="color:rgba({ADD});">task</span> are defined in \ <span style="color:rgba({H});">Preferences -> Default Paths</span>. \ Ideally, both the template and the preferences should define the same folders.'.format( ADD=common.rgb(common.ADD), H=common.rgb(common.TEXT_SELECTED), ) common_ui.add_description(s, label='hint', parent=self) self.layout().addStretch(1)
def add_name_template(): height = common.ROW_HEIGHT() * 0.8 o = common.MARGIN() grp = common_ui.get_group(parent=self) grp.layout().setContentsMargins(o, o, o, o) grp.layout().setSpacing(0) label = common_ui.PaintedLabel(u'Name template', size=common.LARGE_FONT_SIZE(), parent=grp) grp.layout().addWidget(label) grp.layout().addSpacing(o) label = u'<span style="color:rgba({ADD});">File name pattern</span> - {v}:'.format( ADD=common.rgb(common.ADD), v=u'The template used to generate new file names') row = common_ui.add_row(None, padding=None, height=height, parent=grp) common_ui.add_description(label, label=u'', parent=row) row = common_ui.add_row(None, padding=None, height=height, parent=grp) line_edit = common_ui.add_line_edit(defaultpaths.FILE_NAME_PATTERN, parent=row) line_edit.textChanged.connect( functools.partial(text_changed, defaultpaths.FILE_NAME_PATTERN, u'defaultpaths/filenamepattern')) line_edit.setAlignment(QtCore.Qt.AlignLeft) line_edit.setText(defaultpaths.FILE_NAME_PATTERN) s = \ u'Available tokens<br><br>\ <span style="color:rgba({ADD});">{{folder}}</span> - The destination folder<br>\ <span style="color:rgba({ADD});">{{prefix}}</span> - Prefix defined by the bookmark<br>\ <span style="color:rgba({ADD});">{{asset}}</span> - Asset name<br>\ <span style="color:rgba({ADD});">{{mode}}</span> - Selected mode (see below)<br>\ <span style="color:rgba({ADD});">{{user}}</span> - Name of the current user<br>\ <span style="color:rgba({ADD});">{{version}}</span> - Version number<br>\ <span style="color:rgba({ADD});">{{ext}}</span> - File extension' .format( ADD=common.rgb(common.ADD), v=u'The template used to generate new file names' ) grp.layout().addSpacing(o) common_ui.add_description(s, label='', parent=grp)
def __init__(self, short_text, long_text, parent=None): global _message_box_instance _message_box_instance = self super(MessageBox, self).__init__(parent=parent) if parent is None: common.set_custom_stylesheet(self) self.short_text_label = QtWidgets.QLabel(short_text, parent=self) self.short_text_label.setWordWrap(True) self.long_text_label = QtWidgets.QLabel(long_text, parent=self) self.long_text_label.setWordWrap(True) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.setAttribute(QtCore.Qt.WA_TranslucentBackground) self.setAttribute(QtCore.Qt.WA_NoSystemBackground) self.setWindowFlags( QtCore.Qt.Dialog | QtCore.Qt.FramelessWindowHint | QtCore.Qt.NoDropShadowWindowHint | QtCore.Qt.WindowStaysOnTopHint ) self.installEventFilter(self) self.setSizePolicy( QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred ) self._create_UI() self.setStyleSheet(""" QWidget {{ color: rgba({TEXT}); background-color: rgba({BG}); font-family: "{FAMILY}"; font-size: {SIZE}px; }} """.format( SIZE=common.LARGE_FONT_SIZE(), FAMILY=common.font_db.primary_font( common.MEDIUM_FONT_SIZE())[0].family(), TEXT=common.rgb(self.secondary_color.darker(150)), BG=common.rgb(self.secondary_color))) self.ok_button.clicked.connect( lambda: self.done(QtWidgets.QDialog.Accepted))
def _create_UI(self): QtWidgets.QVBoxLayout(self) o = common.MARGIN() self.layout().setContentsMargins(o, o, o, o) self.layout().setSpacing(0) height = common.ROW_HEIGHT() * 0.8 # ******************************************** row = common_ui.add_row(None, padding=None, parent=self) self.save_button = common_ui.ClickableIconButton( u'check', (common.ADD, common.ADD), height) bookmark = u'{}/{}/{}'.format(self.server, self.job, self.root) source = images.get_thumbnail_path(self.server, self.job, self.root, bookmark) pixmap = images.ImageCache.get_pixmap(source, row.height()) if not pixmap: source = images.get_placeholder_path( bookmark, fallback=u'thumb_bookmark_gray') pixmap = images.ImageCache.get_pixmap(source, row.height()) if pixmap: thumbnail = QtWidgets.QLabel(parent=self) thumbnail.setPixmap(pixmap) row.layout().addWidget(thumbnail, 0) row.layout().addSpacing(o * 0.5) text = u'{} | {}'.format(self.job.upper(), self.root.upper()) label = common_ui.PaintedLabel(text, size=common.LARGE_FONT_SIZE()) row.layout().addWidget(label) row.layout().addStretch(1) row.layout().addWidget(self.save_button, 0) self.scrollarea = ScrollArea(parent=self) self.layout().addSpacing(o * 0.5) self.layout().addWidget(self.scrollarea) self.save_button.clicked.connect( lambda: self.done(QtWidgets.QDialog.Accepted))
def _create_UI(self): import bookmarks.common_ui as common_ui QtWidgets.QVBoxLayout(self) o = common.MARGIN() * 0.5 self.layout().setContentsMargins(o, o, o, o) self.layout().setSpacing(o) row = common_ui.add_row(None, parent=self) label = common_ui.PaintedLabel( u'Console', size=common.LARGE_FONT_SIZE(), parent=self) self.reset_button = common_ui.PaintedButton(u'Clear log', parent=self) self.enable_debug = QtWidgets.QCheckBox( 'Log debug messages', parent=self) self.enable_debug.toggled.connect(self.toggle_debug) row.layout().addWidget(label) row.layout().addStretch(1) row.layout().addWidget(self.enable_debug) row.layout().addWidget(self.reset_button) self.logview = LogView(parent=self) self.layout().addWidget(self.logview, 1)
def _create_UI(self): label = common_ui.PaintedLabel( u'Maya Plugin Preferences', size=common.LARGE_FONT_SIZE(), parent=self, ) self.layout().addWidget(label) grp = common_ui.get_group(parent=self) row = common_ui.add_row(u'Sync instances', parent=grp) self.sync_active_button = QtWidgets.QCheckBox( u'Disable instance syncing', parent=self) row.layout().addStretch(1) row.layout().addWidget(self.sync_active_button) label = u'{} instances are syncronised by default. \ For example, when an asset is activated, other instances \ with will also activate the same asset. \ You can turn this behaviour off above.'.format(common.PRODUCT) common_ui.add_description(label, label=u'Help', parent=grp) ###################################################### grp = common_ui.get_group(parent=self) row = common_ui.add_row(u'Alembic Export Path', parent=grp) label = u'Edit the Alembic cache export path below. \ Make sure to include the following tokens:\n\n\ {workspace}: The path to the current workspace.\n\ {exports}: The name of the exports folder ("exports" by default).\n\ {set}: The name of the geometry group (eg. "character_rig_geo")\n\n\ There must be a version number present as well (this will be automatically \ incremented when exporting). Eg. v01, v001 or v0001, etc.' common_ui.add_description(label, parent=grp) self.alembic_export_path = common_ui.add_line_edit( u'eg. {workspace}/{exports}/abc/{set}/{set}_v001.abc', parent=row) row.layout().addWidget(self.alembic_export_path, 1) row = common_ui.add_row(u'Playblast Path', parent=grp) self.capture_path = common_ui.add_line_edit(u'eg. viewport_captures', parent=row) label = u'Edit the relative path of the playblasts (relative to the current project root)' common_ui.add_description(label, parent=grp) row.layout().addWidget(self.capture_path, 1) ###################################################### grp = common_ui.get_group(parent=self) row = common_ui.add_row(u'Workspace warning', parent=grp) self.workspace_warning_button = QtWidgets.QCheckBox( u'Disable workspace change warnings', parent=grp) row.layout().addStretch(1) row.layout().addWidget(self.workspace_warning_button) label = u'Disable the pop-up warning when the current Workspace is \ changed by {}'.format(common.PRODUCT) common_ui.add_description(label, parent=grp) row = common_ui.add_row(u'Save warning', parent=grp) self.save_warning_button = QtWidgets.QCheckBox( u'Don\'t show save warning', parent=grp) row.layout().addStretch(1) row.layout().addWidget(self.save_warning_button) label = u'Saving files outside the current workspace will show a \ warning dialog. Tick to disable (default is "off"):' common_ui.add_description(label, parent=grp) ###################################################### grp = common_ui.get_group(parent=self) row = common_ui.add_row(u'Sync workspace', parent=grp) self.sync_maya_project_button = QtWidgets.QCheckBox( u'Disable workspace syncing', parent=self) row.layout().addStretch(1) row.layout().addWidget(self.sync_maya_project_button) label = u'{} sets the current Workspace to the active asset \ (overriding any Workspace set manually by Maya\'s Set Project). \ Tick above if you want to disable Maya Workspace Syncing \ (default is "off"):'.format(common.PRODUCT) common_ui.add_description(label, parent=grp) self.layout().addStretch(1)
def add_extensions(): height = common.ROW_HEIGHT() * 0.8 o = common.MARGIN() grp = common_ui.get_group(parent=self) grp.layout().setContentsMargins(o, o, o, o) grp.layout().setSpacing(0) description = \ u'Edit the list of valid extensions. Use \ <span style="color:rgba({ADD});">*</span> to allow all files.' .format( p=common.PRODUCT, ADD=common.rgb(common.ADD)) label = common_ui.PaintedLabel(u'Default extension filters', size=common.LARGE_FONT_SIZE(), parent=self) grp.layout().addWidget(label) grp.layout().addSpacing(o) if description: common_ui.add_description(description, label=None, parent=grp) grp.layout().addSpacing(o) scroll_area = QtWidgets.QScrollArea(parent=self) scroll_area.setWidgetResizable(True) scroll_area.setMaximumHeight(common.HEIGHT() * 0.66) scroll_area.setAttribute(QtCore.Qt.WA_NoBackground) scroll_area.setAttribute(QtCore.Qt.WA_TranslucentBackground) grp.layout().addWidget(scroll_area) _row = common_ui.add_row(None, vertical=True, padding=None, height=None, parent=grp) _row.layout().setContentsMargins(0, 0, 0, 0) _row.layout().setSpacing(0) scroll_area.setWidget(_row) for k, v in sorted(defaultpaths.FORMAT_FILTERS.items(), key=lambda x: x[0]): label = u'<span style="color:rgba({ADD});">{k}</span> - {v}:'.format( ADD=common.rgb(common.ADD), k=v[u'name'], v=v[u'description']) row = common_ui.add_row(None, padding=None, height=height, parent=_row) common_ui.add_description(label, label=u'', parent=row) row = common_ui.add_row(None, padding=None, height=height, parent=_row) line_edit = common_ui.add_line_edit(v[u'default'], parent=row) line_edit.textChanged.connect( functools.partial(text_changed, defaultpaths.FORMAT_FILTERS, k)) line_edit.setAlignment(QtCore.Qt.AlignLeft) line_edit.setText(v[u'value'])
def _create_UI(self): import bookmarks label = common_ui.PaintedLabel(u'General Preferences', size=common.LARGE_FONT_SIZE(), parent=self) self.layout().addWidget(label) grp = common_ui.get_group(parent=self) row = common_ui.add_row(u'Frameless window', parent=grp) self.frameless_window = QtWidgets.QCheckBox(u'Use frameless window', parent=self) row.layout().addStretch(1) row.layout().addWidget(self.frameless_window) label = common_ui.PaintedLabel(u'(Restart required)', size=common.SMALL_FONT_SIZE(), color=common.TEXT_DISABLED) row.layout().addWidget(label, 0) if common.STANDALONE: row = common_ui.add_row(u'Scale interface', parent=grp) self.ui_scale = QtWidgets.QComboBox(parent=self) self.ui_scale.setFixedHeight(common.ROW_HEIGHT() * 0.66) for s in (u'100%', u'125%', u'150%', u'175%', u'200%'): self.ui_scale.addItem(s) idx = self.ui_scale.count() - 1 data = int(s.strip(u'%')) * 0.01 self.ui_scale.setItemData(idx, data, role=QtCore.Qt.UserRole) data = QtCore.QSize(1, common.ROW_HEIGHT() * 0.66) self.ui_scale.setItemData(idx, data, role=QtCore.Qt.SizeHintRole) row.layout().addWidget(self.ui_scale, 1) label = common_ui.PaintedLabel(u'(Restart required)', size=common.SMALL_FONT_SIZE(), color=common.TEXT_DISABLED) row.layout().addWidget(label, 0) ############################## row = common_ui.add_row(u'Update', parent=grp) self.check_updates = common_ui.PaintedButton(u'Check for Updates', parent=row) self.show_help = common_ui.PaintedButton(u'Help', parent=row) row.layout().addWidget(self.check_updates) row.layout().addWidget(self.show_help) row.layout().addStretch(1.0) ####################################################### row = common_ui.add_row(None, parent=self) label = common_ui.PaintedLabel(u'Shotgun RV', size=common.LARGE_FONT_SIZE(), parent=row) row.layout().addWidget(label) row.layout().addStretch(1) grp = common_ui.get_group(parent=self) row = common_ui.add_row(u'Path to RV', parent=grp) self.rv_path = common_ui.add_line_edit(u'eg. c:/rv/bin/rv.exe', parent=row) row.layout().addWidget(self.rv_path, 1) button = common_ui.PaintedButton(u'Pick') button.clicked.connect(self.pick_rv) row.layout().addWidget(button) button = common_ui.PaintedButton(u'Reveal') button.clicked.connect(lambda: common.reveal(self.rv_path.text())) row.layout().addWidget(button) text = \ u'You can use {} to push footage to Shotgun RV \ (<span style="color:rgba({});">CTRL+P)</span>. Select the RV executable for this to work.' .format( common.PRODUCT, common.rgb(common.ADD)) common_ui.add_description(text, label=u'Hint', parent=grp) ####################################################### label = common_ui.PaintedLabel(u'Shortcuts', size=common.LARGE_FONT_SIZE(), parent=self) self.layout().addWidget(label) grp = common_ui.get_group(parent=self) label = QtWidgets.QLabel(parent=self) s = u'<table width="100%">' def r(): return unicode('<tr>\ <td align="center" style="background-color:rgba(0,0,0,80);padding:{pad}px;">\ <span style="color:rgba({ADD});">{shortcut}</span>\ </td>\ <td align="left" style="background-color:rgba(0,0,0,30);padding:{pad}px;">\ <span style="color:rgba({TEXT});">{description}</span>\ </td>\ </tr>') for shortcut, description in ( (u'Ctrl+N', u'Open new {} instance'.format(common.PRODUCT)), (u'Enter', u'Activate item'), (u'Space', u'Preview thumbnail'), (u'Arrow Up/Down', u'Navigate list'), (u'Ctrl+R', u'Reload'), (u'Ctrl+F', u'Edit filter'), (u'Ctrl+O', u'Reveal in file manager'), (u'Ctrl+C', u'Copy path'), (u'Ctrl+Shift+C', u'Copy path (alt)'), (u'Ctrl+S', u'Save/remove favourite'), (u'Ctrl+A', u'Archive/enable'), (u'Ctrl+T', u'Show Notes & Todos'), (u'Ctrl+H', u'Hide buttons'), (u'Ctrl+M', u'Toggle thumbnail loading'), (u'Ctrl+Shift+A', u'Show/Hide archived items'), (u'Ctrl+Shift+F', u'Show favourites only/Show all'), (u'Tab', u'Edit item description'), (u'Shift+Tab', u'Edit item description'), (u'Alt+Left', u'Show previous tab'), (u'Alt+Right', u'Show next tab'), (u'Ctrl+1', u'Show bookmarks'), (u'Ctrl+2', u'Show assets'), (u'Ctrl+3', u'Show files'), (u'Ctrl+4', u'Show favourites'), (u'Ctrl+Plus', u'Increase row height'), (u'Ctrl+Minus', u'Decrease row height'), (u'Ctrl+0', u'Reset row height'), ): s += r().format( shortcut=shortcut, description=description, pad=int(common.INDICATOR_WIDTH() * 1.5), ADD=common.rgb(common.ADD), TEXT=common.rgb(common.SECONDARY_TEXT), ) s += u'</table>' label.setText(s) label.setWordWrap(True) grp.layout().addWidget(label) label = common_ui.PaintedLabel(u'About {}'.format(common.PRODUCT), size=common.LARGE_FONT_SIZE(), parent=grp) self.layout().addWidget(label) grp = common_ui.get_group(parent=self) o = common.MARGIN() grp.layout().setContentsMargins(o, o, o, o) # row = common_ui.add_row(u'Version', parent=grp, height=None) s = u'\n'.join(bookmarks.get_info()) common_ui.add_description(s, label=None, parent=grp) self.layout().addStretch(1)
def _create_UI(self): """Creates the ui layout.""" QtWidgets.QVBoxLayout(self) o = common.MARGIN() self.layout().setSpacing(common.INDICATOR_WIDTH()) self.layout().setContentsMargins(o, o, o, o) # Top row height = common.ROW_HEIGHT() * 0.6666 row = common_ui.add_row(None, height=height, parent=self) row.layout().addSpacing(height * 0.33) def paintEvent(event): painter = QtGui.QPainter() painter.begin(row) painter.setPen(QtCore.Qt.NoPen) painter.setBrush(QtGui.QColor(0, 0, 0, 255)) rect = row.rect() rect.setTop(rect.bottom()) painter.drawRect(rect) painter.end() # row.paintEvent = paintEvent # Thumbnail self.add_button = common_ui.ClickableIconButton( u'add', (common.ADD, common.ADD), height, description=u'Click to add a new Todo item...', parent=self) # Name label text = u'Notes and Tasks' label = common_ui.PaintedLabel(text, color=common.SEPARATOR, size=common.LARGE_FONT_SIZE(), parent=self) row.layout().addWidget(label, 1) row.layout().addStretch(1) self.refresh_button = common_ui.ClickableIconButton( u'refresh', (QtGui.QColor(0, 0, 0, 255), QtGui.QColor(0, 0, 0, 255)), height, description=u'Refresh...', parent=self) self.refresh_button.clicked.connect(self.refresh) row.layout().addWidget(self.refresh_button, 0) self.remove_button = common_ui.ClickableIconButton( u'close', (QtGui.QColor(0, 0, 0, 255), QtGui.QColor(0, 0, 0, 255)), height, description=u'Refresh...', parent=self) self.remove_button.clicked.connect(self.close) row.layout().addWidget(self.remove_button, 0) row = common_ui.add_row(None, height=height, parent=self) text = u'Add new note' label = common_ui.PaintedLabel(text, color=common.SECONDARY_TEXT, size=common.SMALL_FONT_SIZE(), parent=self) row.layout().addWidget(self.add_button, 0) row.layout().addWidget(label, 0) row.layout().addStretch(1) self.add_button.clicked.connect(lambda: self.add_item(idx=0)) self.todoeditors_widget = TodoEditors(parent=self) self.setMinimumHeight(common.ROW_HEIGHT() * 3.0) self.scrollarea = QtWidgets.QScrollArea(parent=self) self.scrollarea.setWidgetResizable(True) self.scrollarea.setWidget(self.todoeditors_widget) self.scrollarea.setAttribute(QtCore.Qt.WA_NoSystemBackground) self.scrollarea.setAttribute(QtCore.Qt.WA_TranslucentBackground) self.layout().addWidget(self.scrollarea)