pyqt5

QCheckbox to check all other QCheckBoxes

狂风中的少年 提交于 2020-12-12 06:50:50
问题 My question is very similar to this post, Python PyQt - Checkbox to uncheck all other checkboxes. However, I am trying to check all other boxes when main checkbox is selected and at the same time, if any of the other boxes are selected independently, then I would like to deselect the main checkbox. I tried modifying the answer provided, but not able to put my head around the 'self.sender' signal. I am not able to change the selection when I deselect a checkbox. Here is the code that I

QCheckbox to check all other QCheckBoxes

拜拜、爱过 提交于 2020-12-12 06:50:29
问题 My question is very similar to this post, Python PyQt - Checkbox to uncheck all other checkboxes. However, I am trying to check all other boxes when main checkbox is selected and at the same time, if any of the other boxes are selected independently, then I would like to deselect the main checkbox. I tried modifying the answer provided, but not able to put my head around the 'self.sender' signal. I am not able to change the selection when I deselect a checkbox. Here is the code that I

code crash after opening a QfileDialog in a QThread

左心房为你撑大大i 提交于 2020-12-12 06:27:34
问题 I wrote a code who display in a GUI, the steps of calcul of an algorithm. For this, i use a QThread which is in charge to check the steps and display it in a GUI. This alone is working. However, the first step for the user is to select a configuration file with a QFileDialog. And at this level, Python code crashes after the openning of the QFileDialog if a file is not selected after several seconds. The crash occures when the mouse goes over the QFileDialog window openned. I quite new with

code crash after opening a QfileDialog in a QThread

孤街浪徒 提交于 2020-12-12 06:26:28
问题 I wrote a code who display in a GUI, the steps of calcul of an algorithm. For this, i use a QThread which is in charge to check the steps and display it in a GUI. This alone is working. However, the first step for the user is to select a configuration file with a QFileDialog. And at this level, Python code crashes after the openning of the QFileDialog if a file is not selected after several seconds. The crash occures when the mouse goes over the QFileDialog window openned. I quite new with

Mac PyQt5 menubar not active until unfocusing-refocusing the app

谁都会走 提交于 2020-12-06 04:35:02
问题 I have problems in creating the Qt menubar using PyQt5 in Mac. The problem I have is the menubar would show up, but won't react until I unfocus the app (by clicking the other app), then refocus the Qt app again. Here's my environment: OS: Sierra 10.12 Python: Python 3.6 from conda PyQt5: conda default(v5.3.1) Here's my code (mostly from http://zetcode.com/gui/pyqt5/menustoolbars/): import sys from PyQt5.QtWidgets import QMainWindow, QAction, QDesktopWidget, QApplication, qApp, QMenuBar class

Mac PyQt5 menubar not active until unfocusing-refocusing the app

99封情书 提交于 2020-12-06 04:34:02
问题 I have problems in creating the Qt menubar using PyQt5 in Mac. The problem I have is the menubar would show up, but won't react until I unfocus the app (by clicking the other app), then refocus the Qt app again. Here's my environment: OS: Sierra 10.12 Python: Python 3.6 from conda PyQt5: conda default(v5.3.1) Here's my code (mostly from http://zetcode.com/gui/pyqt5/menustoolbars/): import sys from PyQt5.QtWidgets import QMainWindow, QAction, QDesktopWidget, QApplication, qApp, QMenuBar class

QThread closes whenever QFileDialog Called After Migrating from PyQt5 to Pyside2

别等时光非礼了梦想. 提交于 2020-12-04 04:59:23
问题 First of all, I'm currently migrating my source code from PyQt5 to PySide2 which requires me to change some of the syntaxes. As this site said that it only needs 3 things to do migrate from PyQt to Pyside2. 1.app.exec_. exec_ was used as exec is a Python2 keyword. Under Python3, PyQt5 allows the use of exec but not PySide2. 2.Under PyQt5 it’s QtCore.pyqtSignal and QtCore.pyqtSlot and under PySide2 it’s QtCore.Signal and QtCore.Slot . 3.loading Ui files. But anyway later on when I tried to run

Apps not popping up on macOS Big Sur 11.0.1

心不动则不痛 提交于 2020-12-03 04:15:43
问题 It is always risky to upgrade your operation system. It is likely you will encounter some compatibility issue. I took the risk to upgrade my macOS from Catalina to the newest Big Sur. After that, the display in the new OS looks pretty, but all my PyQt5 apps could not be launched in this new OS. The GUI window does not pop up as usual, and there is no error message showing in the terminal. I spent the whole day trying to figure out what makes this problem. I found the solution but in a weird

How to update a graph from another class

£可爱£侵袭症+ 提交于 2020-11-30 02:07:40
问题 I use the "gross_" button to enable the mouse movement event. The class "MyFilte" handles the "mouse movement" event" In the same class, I plan to update the crosshair depending on the mouse position. To do this, I need to access the null widget, but I do not know how to do this. I was able to track the cursor position. Updating the code. Can't draw a crosshair on the event, and an error occurs: "AttributeError: 'MainWindow' object has no attribute 'QPainter'" Also interested in the

How to update a graph from another class

≯℡__Kan透↙ 提交于 2020-11-30 02:05:21
问题 I use the "gross_" button to enable the mouse movement event. The class "MyFilte" handles the "mouse movement" event" In the same class, I plan to update the crosshair depending on the mouse position. To do this, I need to access the null widget, but I do not know how to do this. I was able to track the cursor position. Updating the code. Can't draw a crosshair on the event, and an error occurs: "AttributeError: 'MainWindow' object has no attribute 'QPainter'" Also interested in the