qtabbar

PyQt5 QTabBar paintEvent with tabs that can move

吃可爱长大的小学妹 提交于 2021-02-08 12:12:37
问题 I would like to have a QTabBar with customised painting in the paintEvent(self,event) method, whilst maintaining the moving tabs animations / mechanics. I posted a question the other day about something similar, but it wasn't worded too well so I have heavily simplified the question with the following code: from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtTest import QTest import sys class MainWindow(QMainWindow): def __init__(self,parent=None,

PyQt5 QTabBar paintEvent with tabs that can move

蹲街弑〆低调 提交于 2021-02-08 12:10:33
问题 I would like to have a QTabBar with customised painting in the paintEvent(self,event) method, whilst maintaining the moving tabs animations / mechanics. I posted a question the other day about something similar, but it wasn't worded too well so I have heavily simplified the question with the following code: from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtTest import QTest import sys class MainWindow(QMainWindow): def __init__(self,parent=None,

PyQt5: Can't see close buttons in QTabBar

痞子三分冷 提交于 2021-01-27 12:04:37
问题 I can't see the close button on individual tabs when using PyQt5. I can close the individual tabs when I click where I know the close button should be, but can't see the button outright: #!/bin/python3 import sys from PyQt5.QtWidgets import (QApplication, QVBoxLayout, QTabBar, QFrame) class App(QFrame): def __init__(self): super().__init__() self.setWindowTitle("Web Browser") self.setBaseSize(683, 384) self.CreateApp() def CreateApp(self): self.layout = QVBoxLayout() self.tab_Bar = QTabBar

PyQt5: Can't see close buttons in QTabBar

做~自己de王妃 提交于 2021-01-27 11:59:07
问题 I can't see the close button on individual tabs when using PyQt5. I can close the individual tabs when I click where I know the close button should be, but can't see the button outright: #!/bin/python3 import sys from PyQt5.QtWidgets import (QApplication, QVBoxLayout, QTabBar, QFrame) class App(QFrame): def __init__(self): super().__init__() self.setWindowTitle("Web Browser") self.setBaseSize(683, 384) self.CreateApp() def CreateApp(self): self.layout = QVBoxLayout() self.tab_Bar = QTabBar

PyQt5: Can't see close buttons in QTabBar

吃可爱长大的小学妹 提交于 2021-01-27 11:52:30
问题 I can't see the close button on individual tabs when using PyQt5. I can close the individual tabs when I click where I know the close button should be, but can't see the button outright: #!/bin/python3 import sys from PyQt5.QtWidgets import (QApplication, QVBoxLayout, QTabBar, QFrame) class App(QFrame): def __init__(self): super().__init__() self.setWindowTitle("Web Browser") self.setBaseSize(683, 384) self.CreateApp() def CreateApp(self): self.layout = QVBoxLayout() self.tab_Bar = QTabBar

pyqt5 tabwidget vertical tab horizontal text alignment left

吃可爱长大的小学妹 提交于 2020-07-15 03:48:26
问题 Since pyqt doesn't have horizontal text in vertical tab option, I followed this link to make it happen. I wanted to have icons on the left and then text after icon and different color for selected tab text, inactive tabs text. Below code gets it done almost. The only problem is text alignment is center. I tried changing tabRect.center() but changing it with left and top or right etc is making it crash. The commented code which I got from this linkgets me left alignment but it didn't have

pyqt5 tabwidget vertical tab horizontal text alignment left

守給你的承諾、 提交于 2020-07-15 03:46:40
问题 Since pyqt doesn't have horizontal text in vertical tab option, I followed this link to make it happen. I wanted to have icons on the left and then text after icon and different color for selected tab text, inactive tabs text. Below code gets it done almost. The only problem is text alignment is center. I tried changing tabRect.center() but changing it with left and top or right etc is making it crash. The commented code which I got from this linkgets me left alignment but it didn't have

Change color of purple tab text in Konsole CSS

倖福魔咒の 提交于 2020-01-24 19:51:26
问题 When input comes in on a tab that is not active, the text for the tab changes to a purple color. What CSS selectors do I need to use to change this? I am using a custom stylesheet in Konsole to change how the tabs look, but can't figure out how to change this one value. This page makes no mention of it. I'm using Konsole 2.13.2(KDE 4.13.3) on Xubuntu 14.04(XFCE). 回答1: As of today, this tab-activity color appears to be set by void TabbedViewContainer::setTabActivity(int index , bool activity)

Make every tab the same width and also expandable

梦想的初衷 提交于 2020-01-13 18:14:07
问题 I'm trying to achieve something like the tabs from a Browser. All tabs must have the same width and also be expandable so when there are a lot of them they need to resize and fit the window (exactly like Chrome or Firefox does). The Problem: If a tab have more text then the other tabs, the tab will be larger. Like so: And if I spawn a lot of tabs, it will always be larger then the others. What I have tried: I have tried to add a stylesheet to change the width, but if I change the width to a

Qt Use QTabBar in a Different QLayout

﹥>﹥吖頭↗ 提交于 2019-12-25 06:35:22
问题 I have a custom QTabWidget and a custom QTabBar. Everything is working fine and I can go through the tabs and stuff. But the thing is, I wanna put the QTabBar in a different layout than the QTabWidget. This way I can make a Menu Bar type of layout where I have the tabs and a couple differnt QPushButtons next to it all going left to right in the same row aligned. So, basically can I move the QTabBar into a separate QHBoxLayout or QGridLayout away from the tab widget, but keep the functionality