pyqt5

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

Runtime error when calling a .exe made with PyInstaller including PyQt4

这一生的挚爱 提交于 2021-01-27 11:46:44
问题 So, I have two .py files, one generated by QtDesigner and another which basically implements the functionality of the GUI. Using, pyinstaller, I generated a .exe file to use it on systems without python and the associated libraries. The command: pyinstaller my_script.py runs fine without any errors. The problem occurs when I run the .exe file. Error: Qt: Untested Windows version 10.0 detected! Traceback (most recent call last): File "site-packages\PyInstaller\loader\rthooks\pyi_rth_qt4plugins

How to get the current QApplication in pyQt?

落花浮王杯 提交于 2021-01-27 06:44:08
问题 I am trying to get a reference to the current QApplication object with pyQt5, but couldn't find the function. My search about "pyQt get current QApplication" shows results about how to create an QApplication. So my question is: Is there a global QApplication object, and if so how can get a reference to an existing (the current) application. The reason I ask, is that I want to test if a debugging code is running within a Qt GUI application. Then, I'd like to bring up a QMessagebox to show

How to get the current QApplication in pyQt?

独自空忆成欢 提交于 2021-01-27 06:42:27
问题 I am trying to get a reference to the current QApplication object with pyQt5, but couldn't find the function. My search about "pyQt get current QApplication" shows results about how to create an QApplication. So my question is: Is there a global QApplication object, and if so how can get a reference to an existing (the current) application. The reason I ask, is that I want to test if a debugging code is running within a Qt GUI application. Then, I'd like to bring up a QMessagebox to show

How to get the current QApplication in pyQt?

不羁的心 提交于 2021-01-27 06:41:17
问题 I am trying to get a reference to the current QApplication object with pyQt5, but couldn't find the function. My search about "pyQt get current QApplication" shows results about how to create an QApplication. So my question is: Is there a global QApplication object, and if so how can get a reference to an existing (the current) application. The reason I ask, is that I want to test if a debugging code is running within a Qt GUI application. Then, I'd like to bring up a QMessagebox to show

How to download csv file with QWebEngineView and QUrl

廉价感情. 提交于 2021-01-24 09:11:13
问题 I'm building a program which uses QWebEngineView and QUrl to display a website in my PyQt5 app (running on Windows 10). However, I now want to be able to download a CSV file from the same website, but being a noob I can't seem to figure out how. I'm familiar with using requests , urllib.request , urllib3 , etc. for downloading files, but for this, I specifically want to do it with the QWebEngineView, as the user will have authenticated the request previously in the pyqt5 window. The code to

Make a simple stopwatch stoppable

一笑奈何 提交于 2021-01-20 09:49:44
问题 I'm writing a simple stopwatch with python (using pyqt5). So far, start/pause/resume functions are working fine but the problem is when I stop the counter and need to start from 0 a thread can't be started again I tried the subclass from here but it's not working. import threading from PyQt5 import QtWidgets from stpw_ui import Ui_MainWindow from time import sleep # code snippet from stack overflow to stop a thread class StoppableThread(threading.Thread): def __init__(self, *args, **kwargs):

Make a simple stopwatch stoppable

故事扮演 提交于 2021-01-20 09:48:47
问题 I'm writing a simple stopwatch with python (using pyqt5). So far, start/pause/resume functions are working fine but the problem is when I stop the counter and need to start from 0 a thread can't be started again I tried the subclass from here but it's not working. import threading from PyQt5 import QtWidgets from stpw_ui import Ui_MainWindow from time import sleep # code snippet from stack overflow to stop a thread class StoppableThread(threading.Thread): def __init__(self, *args, **kwargs):

AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' for PyQt5 5.15.0

那年仲夏 提交于 2021-01-20 08:11:51
问题 A program I am trying to install requires the installation of PyQt5 5.15.0 , which gives me this error. The odd thing is that the installation works fine for the latest version of PyQt5 (5.15.2), but this program requires 5.15.0 specifically. Command Output: Collecting PyQt5==5.15.0 Using cached PyQt5-5.15.0.tar.gz (3.3 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... error ERROR: Command errored out with exit status 1: