def __init__(self, parent=None): super(NoSceneVersionWidget, self).__init__(parent) self.setMinimumWidth(700) css_loading = """ background:#222; border-radius: 4px; padding:10px; border: 0px; """ css_image = """ background: url(':ftrack/image/integration/no-asset') no-repeat center center; """ main_layout = QtGui.QHBoxLayout(self) frame = QtGui.QFrame(self) frame.setMaximumSize(QtCore.QSize(350, 400)) frame.setStyleSheet(css_loading) frame.setFrameShape(QtGui.QFrame.StyledPanel) frame.setFrameShadow(QtGui.QFrame.Raised) frame_layout = QtGui.QVBoxLayout(frame) movie_screen = QtGui.QFrame(frame) movie_screen.setMinimumSize(QtCore.QSize(300, 300)) movie_screen.setStyleSheet(css_image) warning = QtGui.QLabel(frame) warning.setText("No scene asset found for the selected task") warning.setWordWrap(True) warning.setAlignment(QtCore.Qt.AlignCenter) frame_layout.addWidget(movie_screen) frame_layout.addWidget(warning) main_layout.addWidget(frame)
def _buildUI(self, layout): ## @todo Some of these should probably be widgets in their own right, but ## it needs a little though due to the interaction between them. # Add the 'Create Under' section, to choose the parent entity that should # receive the new shots. specification = ShotSpecification() pickerCls = self._session.getManagerWidget( FnAssetAPI.ui.constants.kInlinePickerWidgetId, instantiate=False) # Parent Picker parentPickerLayout = QtGui.QHBoxLayout() parentPickerLayout.addWidget( QtGui.QLabel("Look for matching Shots under:")) self._shotParentPicker = pickerCls(specification, self._context) parentPickerLayout.addWidget(self._shotParentPicker) layout.addLayout(parentPickerLayout) mediaWidget = self._buildClipsTab() layout.addWidget(mediaWidget)
def setupUI(self): main_layout = QtGui.QVBoxLayout(self) main_layout.setContentsMargins(0, 0, 0, 0) main_layout.setSpacing(0) self._script_editor_tree = ScriptEditorTreeView(self) self._script_editor_tree.setSelectionMode( QtGui.QAbstractItemView.NoSelection) self._script_editor_tree.setIndentation(20) self._script_editor_tree.setAnimated(True) self._script_editor_tree.setHeaderHidden(True) self._script_editor_tree.setExpandsOnDoubleClick(True) self._script_editor_tree.file_dropped.connect(self._emit_dropped_file) main_layout.addWidget(self._script_editor_tree) self._option_frame = QtGui.QFrame(self) option_layout = QtGui.QHBoxLayout(self._option_frame) option_layout.setContentsMargins(0, 8, 0, 8) option_layout.setSpacing(8) # filter_lbl = QtGui.QLabel("Filter", self._option_frame) css_filter = """ QLineEdit { border: 1px solid #666; background: #555; color: #000; } """ self._filter_edit = QtGui.QLineEdit(self._option_frame) self._filter_edit.setMaximumHeight(20) # self._filter_edit.setStyleSheet(css_filter) self._filter_edit.textChanged.connect(self._set_filter) self._previous_occurence = QtGui.QPushButton('previous', self._option_frame) # self._previous_occurence.setArrowType(QtCore.Qt.LeftArrow) # self._previous_occurence.setMaximumWidth(20) # self._previous_occurence.setMaximumHeight(20) self._next_occurence = QtGui.QPushButton('next', self._option_frame) # self._next_occurence.setArrowType(QtCore.Qt.RightArrow) # self._next_occurence.setMaximumWidth(20) # self._next_occurence.setMaximumHeight(20) spacer = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self._collapse_all_btn = QtGui.QPushButton("Collapse All", self._option_frame) self._collapse_all_btn.setMaximumHeight(20) # self._collapse_all_btn.setStyleSheet(css_btn) self._collapse_all_btn.clicked.connect( self._script_editor_tree.collapseAll) self._expand_all_btn = QtGui.QPushButton("Expand All", self._option_frame) self._expand_all_btn.setMaximumHeight(20) # self._expand_all_btn.setStyleSheet(css_btn) self._expand_all_btn.clicked.connect( self._script_editor_tree.expandAll) option_layout.addWidget(self._filter_edit) option_layout.addWidget(self._previous_occurence) option_layout.addWidget(self._next_occurence) option_layout.addItem(spacer) option_layout.addWidget(self._collapse_all_btn) option_layout.addWidget(self._expand_all_btn) main_layout.addWidget(self._option_frame)
def _buildShotsTab(self): l = FnAssetAPI.l # > Shots Tab shotsWidget = QtGui.QWidget() shotsWidget.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) shotsWidgetLayout = QtGui.QVBoxLayout() shotsWidgetLayout.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) shotsWidget.setLayout(shotsWidgetLayout) self._tickIcon = QtGui.QIcon("icons:TagGood.png") self._actionIcon = QtGui.QIcon("icons:Add.png") self._shotsList = AdvancedHieroItemSpreadsheet() self._shotsList.setAlternatingRowColors(True) self._shotsList.setIcons(self._actionIcon, self._tickIcon) self._shotsList.setHiddenProperties(("nameHint",)) self._shotsList.setForcedProperties( ("startFrame", "endFrame", "inFrame", "outFrame")) self._shotsList.setStatusText(l("New {shot}"), l("Existing {shot}")) self._shotsList.setDisabledCallback(self.__shotItemIsDisabled) shotsWidgetLayout.addWidget(self._shotsList) # See if we have any options from the manager shotSpec = ShotSpecification() self._managerOptionsShot = self._session.getManagerWidget( FnAssetAPI.ui.constants.kRegistrationManagerOptionsWidgetId, throw=False, args=(shotSpec, self._context)) if self._managerOptionsShot: shotsWidgetLayout.addWidget(self._managerOptionsShot) shotsWidgetLayout.addSpacing(10) # Length Options self._shotLengthGBox = QtGui.QGroupBox("Set Shot Timings from Hiero") self._shotLengthGBox.setCheckable(True) self._shotLengthGBox.setChecked(False) slGbLayout = QtGui.QHBoxLayout() self._shotLengthGBox.setLayout(slGbLayout) self._shotLengthOptionsWidget = TrackItemTimingOptionsWidget() slGbLayout.addWidget(self._shotLengthOptionsWidget) slGbLayout.addStretch() shotsWidgetLayout.addWidget(self._shotLengthGBox) return shotsWidget
def _build(self): '''Build and layout widget.''' layout = QtGui.QVBoxLayout() layout.setContentsMargins(0, 0, 0, 0) self.setLayout(layout) if self._specification.isOfType('group'): self.setHidden(True) else: # Assume asset task type. self._taskTypeCombo = QtGui.QComboBox() self._taskTypeCombo.addItems(('Compositing', 'Editing')) taskLayout = QtGui.QHBoxLayout() taskLayout.addWidget(QtGui.QLabel('Create under task: ')) taskLayout.addWidget(self._taskTypeCombo) layout.addLayout(taskLayout)
def _buildShotsTab(self): l = FnAssetAPI.l # > Shots Tab shotsWidget = QtGui.QWidget() shotsWidget.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) shotsWidgetLayout = QtGui.QVBoxLayout() shotsWidgetLayout.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) shotsWidget.setLayout(shotsWidgetLayout) # - Conflicting Shots self._shotsList = AdvancedHieroItemSpreadsheet() self._shotsList.setAlternatingRowColors(True) self._shotsList.setHiddenProperties(("nameHint",)) self._shotsList.setForcedProperties( ("startFrame", "endFrame", "inFrame", "outFrame", "inTimecode", "sourceTimecode")) self._shotsList.setStatusText(l("Update Timings"), l("Timings Match")) self._shotsList.setDisabledCallback(self.__shotItemIsDisabled) self._shotsList.setStatusCallback(self.__statusForShotItem) self._shotsList.setIconCallback(self.__iconForShotItem) shotsWidgetLayout.addWidget(self._shotsList) # Length Options self._shotLengthGBox = QtGui.QGroupBox("Set Shot Timings") self._shotLengthGBox.setCheckable(True) self._shotLengthGBox.setChecked(False) slGbLayout = QtGui.QHBoxLayout() self._shotLengthGBox.setLayout(slGbLayout) self._shotLengthOptionsWidget = TrackItemTimingOptionsWidget() slGbLayout.addWidget(self._shotLengthOptionsWidget) slGbLayout.addStretch() shotsWidgetLayout.addWidget(self._shotLengthGBox) return shotsWidget
def _buildUI(self, layout): self._managerOptionsShot = None # Add the 'Create Under' section, to choose the parent entity that should # receive the new shots. specification = ShotSpecification() pickerCls = self._session.getManagerWidget( FnAssetAPI.ui.constants.kInlinePickerWidgetId, instantiate=False) # Parent Picker parentPickerLayout = QtGui.QHBoxLayout() layout.addLayout(parentPickerLayout) parentPickerLayout.addWidget(QtGui.QLabel("Create Under:")) self._shotParentPicker = pickerCls(specification, self._context) parentPickerLayout.addWidget(self._shotParentPicker) shotsWidget = self._buildShotsTab() layout.addWidget(shotsWidget)
def __init__(self, status_list, parent=None): super(StatusWidget, self).__init__(parent) layout = QtGui.QHBoxLayout(self) layout.setContentsMargins(0, 0, 0, 0) layout.setSpacing(8) self._read_only = True self._original_status = None self._status_dict = dict() for status in status_list: self._status_dict[status.getName()] = status self._status_display = StatusWidgetDisplay(self) self._status_display.mouseDblClick.connect( self._toggle_status_combobox) layout.addWidget(self._status_display) self._status_cbbox = StatusComboBox(status_list, self) self._status_cbbox.currentStatusChanged.connect( self._toggle_status_combobox) self._status_cbbox.setVisible(False) layout.addWidget(self._status_cbbox) self._revert_btn = QtGui.QToolButton(self) self._revert_btn.setText("revert status") revert_css = """ QToolButton { background:transparent; border:none; color: #de8888; text-decoration: underline; }` QToolButton:hover {color: #dd2727;} """ self._revert_btn.setStyleSheet(revert_css) self._revert_btn.clicked.connect(self._revert_status) self._revert_btn.setVisible(False) layout.addWidget(self._revert_btn)
def setupUI(self): super(ScriptPublisherDialog, self).setupUI() self.resize(1226, 790) self.setMinimumWidth(1226) self.setMinimumHeight(790) # self.tasks_frame.setStyleSheet("background-color:grey;") # HEADER self.asset_conn_container = QtGui.QWidget(self.main_container) self.asset_conn_container_layout = QtGui.QHBoxLayout() self.asset_conn_container.setLayout(self.asset_conn_container_layout) # self.main_container_layout.addWidget(self.asset_conn_container) self.asset_conn_label = QtGui.QLabel('Type', self.main_container) self.asset_conn_label.setMinimumWidth(60) self.asset_conn_combo = QtGui.QComboBox(self.main_container) self.asset_conn_combo.setMinimumHeight(23) self.asset_conn_combo.addItems(self._connectors_per_type.keys()) spacer_asset_type = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.asset_conn_container_layout.addWidget(self.asset_conn_label) self.asset_conn_container_layout.addWidget(self.asset_conn_combo) self.asset_conn_container_layout.addItem(spacer_asset_type) self.tasks_main_container_layout.addWidget(self.asset_conn_container) # Create "main content" for the publisher self.publish_container = QtGui.QWidget(self.main_container) self.publish_container.setSizePolicy( QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding, ) self.publish_container_layout = QtGui.QHBoxLayout() self.publish_container_layout.setContentsMargins(0, 0, 0, 0) self.publish_container.setLayout(self.publish_container_layout) self.main_container_layout.addWidget(self.publish_container) # Create "main content" splitter for the publisher self.publish_splitter = QtGui.QSplitter(self.publish_container) self.publish_splitter.setContentsMargins(0, 0, 0, 0) self.publish_splitter.setChildrenCollapsible(False) self.publish_container_layout.addWidget(self.publish_splitter) self.publish_container_layout.setContentsMargins(0, 0, 0, 0) # Create left and right containers for the splitter self.publish_left_container = QtGui.QWidget(self.publish_splitter) self.publish_right_container = QtGui.QWidget(self.publish_splitter) self.publish_left_container_layout = QtGui.QVBoxLayout() self.publish_right_container_layout = QtGui.QVBoxLayout() self.publish_right_container_layout.setContentsMargins(5, 0, 0, 0) self.publish_left_container.setLayout( self.publish_left_container_layout) self.publish_right_container.setLayout( self.publish_right_container_layout) # Left Splitter Container self.publish_left_container_layout.setContentsMargins(0, 0, 5, 0) self.left_tasks_widget = TaskWidget(self.publish_left_container) self.left_tasks_widget.set_read_only(False) self.left_tasks_widget.set_selection_mode(False) self.publish_left_container_layout.addWidget(self.left_tasks_widget) # Right Splitter Containers css_asset_version = "color: #de8888; font-weight: bold;" self.right_top_container = QtGui.QFrame(self.publish_right_container) self.right_mid_container = QtGui.QFrame(self.publish_right_container) self.right_bot_container = QtGui.QFrame(self.publish_right_container) self.right_top_container_layout = QtGui.QHBoxLayout() self.right_mid_container_layout = QtGui.QHBoxLayout() self.right_bot_container_layout = QtGui.QHBoxLayout() self.right_top_container.setLayout(self.right_top_container_layout) self.right_mid_container.setLayout(self.right_mid_container_layout) self.right_bot_container.setLayout(self.right_bot_container_layout) self.publish_right_container_layout.addWidget(self.right_top_container) self.publish_right_container_layout.addWidget(self.right_mid_container) self.publish_right_container_layout.addWidget(self.right_bot_container) # Right Splitter TOP Container asset_title_label = QtGui.QLabel('Asset', self.right_top_container) self._asset_name = QtGui.QLabel('Loading...', self.right_top_container) asset_spacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) version_title_label = QtGui.QLabel('Version', self.right_top_container) self._asset_version = QtGui.QLabel('Loading...', self.right_top_container) self._asset_version.setStyleSheet(css_asset_version) self.right_top_container_layout.addWidget(asset_title_label) self.right_top_container_layout.addWidget(self._asset_name) self.right_top_container_layout.addItem(asset_spacer) self.right_top_container_layout.addWidget(version_title_label) self.right_top_container_layout.addWidget(self._asset_version) # Right Splitter MID Container self._snapshotWidget = SnapshotsWidget(self.right_mid_container) self.right_mid_container_layout.addWidget(self._snapshotWidget) # Right Splitter BOT Container self._comment_widget = CommentWidget(self.right_bot_container) self.right_bot_container_layout.addWidget(self._comment_widget) self._save_btn.setText("Publish and Save script") self._save_btn.clicked.disconnect() self.modify_layouts(self.asset_conn_container, spacing=0, margin=(0, 0, 0, 0), alignment=QtCore.Qt.AlignTop) self.append_css(self.global_css) self.set_css(self.main_container) self._connect_script_signals()
def _buildClipsTab(self): l = FnAssetAPI.l imageSpecification = ImageSpecification() # > Media Ta mediaWidget = QtGui.QWidget() mediaWidget.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) mediaWidgetLayout = QtGui.QVBoxLayout() mediaWidgetLayout.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) mediaWidget.setLayout(mediaWidgetLayout) # - Shared Media self._sharedClipsGroup = QtGui.QGroupBox( l("Some Source Clips are Shared " + "and used in more than one Shot in the Edit")) mediaWidgetLayout.addWidget(self._sharedClipsGroup) sharedClipsGroupLayout = QtGui.QVBoxLayout() self._sharedClipsGroup.setLayout(sharedClipsGroupLayout) self._sharedIgnoredRadio = QtGui.QRadioButton(l("Don't {publish}")) self._sharedToSequenceRadio = QtGui.QRadioButton( l("{publish} at the level above the Shots")) self._sharedToCustomRadio = QtGui.QRadioButton( l("{publish} to another location")) self._sharedIgnoredRadio.setChecked(True) sharedClipsGroupLayout.addWidget(self._sharedIgnoredRadio) sharedClipsGroupLayout.addWidget(self._sharedToSequenceRadio) sharedClipsGroupLayout.addWidget(self._sharedToCustomRadio) ## @todo Use the project entityReferences Parent if we have one? pickerCls = self._session.getManagerWidget( FnAssetAPI.ui.constants.kInlinePickerWidgetId, instantiate=False) self._sharedClipParentPicker = pickerCls(imageSpecification, self._context) self._sharedClipParentPicker.setVisible(False) sharedClipsGroupLayout.addWidget(self._sharedClipParentPicker) self._previewWidget = PublishShotClipsSummaryWidget() self._previewWidget.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) mediaWidgetLayout.addWidget(self._previewWidget) # - Options self._clipOptionsGroup = QtGui.QGroupBox(l("Options")) optionsGroupLayout = QtGui.QVBoxLayout() self._clipOptionsGroup.setLayout(optionsGroupLayout) mediaWidgetLayout.addWidget(self._clipOptionsGroup) # See if we have any options from the manager self._managerOptionsClip = self._session.getManagerWidget( FnAssetAPI.ui.constants.kRegistrationManagerOptionsWidgetId, throw=False, args=(imageSpecification, self._context)) if self._managerOptionsClip: optionsGroupLayout.addWidget(self._managerOptionsClip) optionsGroupLayout.addSpacing(10) hieroOptionsGrid = QtGui.QGridLayout() ## @todo we should have some base widget for this hieroOptionsGrid.addWidget(QtGui.QLabel(l("{asset} name:")), 0, 0) self._clipNameCombo = QtGui.QComboBox() self._clipNameCombo.addItems(("Clip Name", "Custom")) hieroOptionsGrid.addWidget(self._clipNameCombo, 0, 1) self._clipNameCustomField = QtGui.QLineEdit() hieroOptionsGrid.addWidget(self._clipNameCustomField, 0, 2) self._replaceClipSource = QtGui.QCheckBox( l("Link Source Clips to " + "{published} {assets}")) hieroOptionsGrid.addWidget(self._replaceClipSource, 1, 1, 1, 2) self._ignorePublishedClips = QtGui.QCheckBox( l("Ignore Source Clips that are " + "already {published}")) hieroOptionsGrid.addWidget(self._ignorePublishedClips, 2, 1, 1, 2) # Make sure we don't stretch the grid layout too much and make the last #column really wide hieroOptionsHBox = QtGui.QHBoxLayout() optionsGroupLayout.addLayout(hieroOptionsHBox) hieroOptionsHBox.addLayout(hieroOptionsGrid) hieroOptionsHBox.addStretch() return mediaWidget
def setupUI(self): css_asset_global = """ QFrame { padding: 3px; background: #222; color: #FFF; font-size: 13px; } QLabel { padding: 0px; background: none; } """ self._css_lbl = "color: #AAA;" css_asset_name = "color: #c3cfa4; font-weight: bold;" css_asset_version = "color: #de8888; font-weight: bold;" css_comment = """ color: #f0f0f0; background: #444; padding: 3px ; border-radius: 2px; """ self._css_value = "color: #FFF; text-decoration: none;" self.setMinimumWidth(700) asset_frame_layout = QtGui.QVBoxLayout(self) asset_frame_layout.setContentsMargins(0, 0, 0, 0) asset_frame_layout.setSpacing(10) asset_main_frame = QtGui.QFrame(self) asset_main_frame.setStyleSheet(css_asset_global) asset_main_frame_layout = QtGui.QHBoxLayout(asset_main_frame) asset_main_frame_layout.setSpacing(10) asset_name_lbl = QtGui.QLabel("Asset", asset_main_frame) self._asset_name = QtGui.QLabel("...", asset_main_frame) self._asset_name.setStyleSheet(css_asset_name) spacer_asset = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) asset_version_lbl = QtGui.QLabel("Version", asset_main_frame) self._asset_version = QtGui.QLabel("...", asset_main_frame) self._asset_version.setStyleSheet(css_asset_version) asset_main_frame_layout.addWidget(asset_name_lbl) asset_main_frame_layout.addWidget(self._asset_name) asset_main_frame_layout.addItem(spacer_asset) asset_main_frame_layout.addWidget(asset_version_lbl) asset_main_frame_layout.addWidget(self._asset_version) asset_frame_layout.addWidget(asset_main_frame) overview_layout = QtGui.QHBoxLayout() overview_layout.setContentsMargins(0, 0, 0, 0) overview_layout.setSpacing(10) self._thumbnail_widget = ThumbnailWidget(self) overview_layout.addWidget(self._thumbnail_widget) self._infos_layout = QtGui.QFormLayout() self._infos_layout.setContentsMargins(0, 0, 0, 0) self._infos_layout.setSpacing(10) asset_type_lbl = QtGui.QLabel("Asset type", self) asset_type_lbl.setStyleSheet(self._css_lbl) self._asset_type = QtGui.QLabel(self) self.set_asset_type("...") status_lbl = QtGui.QLabel("Status", self) status_lbl.setStyleSheet(self._css_lbl) self._status = StatusWidget(ftrack.getTaskStatuses(), self) self._status.set_read_only(True) publish_lbl = QtGui.QLabel("Published by", self) publish_lbl.setStyleSheet(self._css_lbl) self._owner = QtGui.QLabel("...", self) self._owner.setTextFormat(QtCore.Qt.RichText) self._owner.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction) self._owner.setOpenExternalLinks(True) date_lbl = QtGui.QLabel("on", self) date_lbl.setStyleSheet(self._css_lbl) self._date = QtGui.QLabel(self) self._date.setStyleSheet(self._css_value) self._editor = None self._date_edit = None availability_lbl = QtGui.QLabel("Availability", self) availability_lbl.setStyleSheet(self._css_lbl) self._availability = QtGui.QLabel(self) self._availability.setStyleSheet(self._css_value) comment_lbl = QtGui.QLabel("Comment", self) comment_lbl.setStyleSheet(self._css_lbl) self._comment = QtGui.QLabel("...", self) self._comment.setWordWrap(True) self._comment.setStyleSheet(css_comment) self._infos_layout.setWidget(0, QtGui.QFormLayout.LabelRole, asset_type_lbl) self._infos_layout.setWidget(0, QtGui.QFormLayout.FieldRole, self._asset_type) self._infos_layout.setWidget(1, QtGui.QFormLayout.LabelRole, status_lbl) self._infos_layout.setWidget(1, QtGui.QFormLayout.FieldRole, self._status) self._infos_layout.setWidget(2, QtGui.QFormLayout.LabelRole, publish_lbl) self._infos_layout.setWidget(2, QtGui.QFormLayout.FieldRole, self._owner) self._infos_layout.setWidget(3, QtGui.QFormLayout.LabelRole, date_lbl) self._infos_layout.setWidget(3, QtGui.QFormLayout.FieldRole, self._date) self._infos_layout.setWidget(4, QtGui.QFormLayout.LabelRole, availability_lbl) self._infos_layout.setWidget(4, QtGui.QFormLayout.FieldRole, self._availability) self._infos_layout.setWidget(5, QtGui.QFormLayout.LabelRole, comment_lbl) self._infos_layout.setWidget(5, QtGui.QFormLayout.FieldRole, self._comment) overview_layout.addItem(self._infos_layout) spacer_overview = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) overview_layout.addItem(spacer_overview) asset_frame_layout.addItem(overview_layout) self._tab_widget = QtGui.QTabWidget(self) css_tab = """ /* QTabWidget::pane { border-top: 2px solid #151515; top: -2px; border-top-left-radius: 0px; border-top-right-radius: 0px; background: #282828; } QTabBar::tab { padding: 6px 10px; background: #151515; border-top: 2px solid #151515; border-right: 2px solid #151515; border-left: 2px solid #151515; border-radius: 0px; } QTabBar::tab:selected { background: #333; border-top-left-radius: 4px; border-top-right-radius: 4px; } QTabBar::tab:hover { background: #222; } QTabBar::tab:!selected { margin-top: 2px; } */ """ self._tab_widget.setStyleSheet(css_tab) # Display asset history tab_asset_history = QtGui.QWidget() tab_asset_history_layout = QtGui.QVBoxLayout(tab_asset_history) tab_asset_history_layout.setContentsMargins(0, 8, 0, 0) self._graph_widget = StatisticWidget(self.scene_version, self) tab_asset_history_layout.addWidget(self._graph_widget) self._tab_widget.addTab(tab_asset_history, "Asset history") asset_frame_layout.addWidget(self._tab_widget) spacer_global = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) asset_frame_layout.addItem(spacer_global)