pyqt

Python/PySide: How can i destroy a terminated thread object?

人走茶凉 提交于 2020-12-04 01:48:35
问题 I would like to implement a button to stop a thread with a process, it works but not as expected: i can't delete the thread object. ( EDIT: The reference to the thread object seems to be deleted, but the signals are not disconnected automatically by deleting the thread object, i can access it anyway via the signal.) I have a modul with a class thread_worker and a function for complex processing which is running as process: from PySide.QtCore import * from PySide.QtGui import * import

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

How can I set Custom Key board Key press event in Qtablewidget Python?

霸气de小男生 提交于 2020-11-29 19:16:14
问题 I have a QTableWidget generated by QTDesigner in which I want to set some custom key press events. when current cell is in edit mode and if user presses Tab key, it moves to next cell in edit mode but i just want it move to next cell selected and not in edit mode. when current cell is in edit mode and if user presses Left, right, up, down- it should move to corresponding cell in select mode again and not in edit mode. both of this works well right now if current cell is just selected and not

How can I set Custom Key board Key press event in Qtablewidget Python?

风格不统一 提交于 2020-11-29 19:15:42
问题 I have a QTableWidget generated by QTDesigner in which I want to set some custom key press events. when current cell is in edit mode and if user presses Tab key, it moves to next cell in edit mode but i just want it move to next cell selected and not in edit mode. when current cell is in edit mode and if user presses Left, right, up, down- it should move to corresponding cell in select mode again and not in edit mode. both of this works well right now if current cell is just selected and not

How can I set Custom Key board Key press event in Qtablewidget Python?

試著忘記壹切 提交于 2020-11-29 19:15:22
问题 I have a QTableWidget generated by QTDesigner in which I want to set some custom key press events. when current cell is in edit mode and if user presses Tab key, it moves to next cell in edit mode but i just want it move to next cell selected and not in edit mode. when current cell is in edit mode and if user presses Left, right, up, down- it should move to corresponding cell in select mode again and not in edit mode. both of this works well right now if current cell is just selected and not

How to play videos in pyqt

筅森魡賤 提交于 2020-11-29 03:44:18
问题 I want to play video files depending the select file in this function: def abrir(): QFileDialog.getOpenFileName(None, ("Selecciona los medios"), os.getcwd(), ("Video Files (*.avi *.mp4 *.flv)")) My Question is what opcion i have to use or what module to play video files in pyqt EDIT: To play the code of S. Nick I hace to install K lite code 回答1: Try it: from PyQt5.QtGui import QIcon, QFont from PyQt5.QtCore import QDir, Qt, QUrl, QSize from PyQt5.QtMultimedia import QMediaContent,

AttributeError: QDialog object has no attribute setCentralWidget

最后都变了- 提交于 2020-11-28 09:01:12
问题 I'm trying to create a GUI with QT Designer. I've converted my .ui designer file to a .py file using the following tutorial: http://pyqt.sourceforge.net/Docs/PyQt5/designer.html. I have the following code: # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QDialog class Ui_ImageDialog(object): def setupUi(self, MainWindow): MainWindow.setObjectName(

AttributeError: QDialog object has no attribute setCentralWidget

假如想象 提交于 2020-11-28 08:57:29
问题 I'm trying to create a GUI with QT Designer. I've converted my .ui designer file to a .py file using the following tutorial: http://pyqt.sourceforge.net/Docs/PyQt5/designer.html. I have the following code: # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QDialog class Ui_ImageDialog(object): def setupUi(self, MainWindow): MainWindow.setObjectName(

AttributeError: QDialog object has no attribute setCentralWidget

ε祈祈猫儿з 提交于 2020-11-28 08:57:06
问题 I'm trying to create a GUI with QT Designer. I've converted my .ui designer file to a .py file using the following tutorial: http://pyqt.sourceforge.net/Docs/PyQt5/designer.html. I have the following code: # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QDialog class Ui_ImageDialog(object): def setupUi(self, MainWindow): MainWindow.setObjectName(