Questions tagged as 'pyqt5'

1
answer

Start animation with hover event in python

I'm doing an animation of a simple frame, but I want the animation to start when the cursor is on the frame and return to its initial shape when it leaves the frame. Since at the moment it only works with one button, this is my code import...
asked by 26.06.2018 / 18:48
1
answer

libvlc - python access violation reading 0x00000094

Good afternoon I am trying to generate a Python player with PyQt using the Python binding for VLC (libvlc), but it throws me the following error: This is my code: import sys from PyQt5.QtWidgets import QMainWindow, QApplication import...
asked by 18.05.2018 / 00:45
1
answer

keypressevent does not detect the enter key pyqt

A simple question I am trying to detect the enter key of my keyboard by pressing it but it does not work. this is the code I use: import sys from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import QtCore from PyQt5 import Qt...
asked by 21.03.2018 / 01:51
1
answer

python - re-dimension element with a random number

I want to re-dimension the frame that I create, the idea is to take a random number to pass it as value height() , this must be done in a certain cycle in this case 100 times with a value update time each second time.sleep(1) , this...
asked by 18.03.2018 / 05:26
1
answer

Use stylesheet in a qtablewidget to send properties of a cell

I'm trying to change the color of the text and background of an item in a qtablewidget with this code: tabla.item(0,0).setStyleSheet("QTableWidget::item {border: 1px solid red;}") Where table refers to a QTableWidget. However, it does no...
asked by 13.09.2018 / 07:34
1
answer

Python3. NameError: name '' is not defined

I am using PyQt5 with Python 3 and I am trying to import redis, but when making the connection it gives me this error named 'connection' is not defined the code I have it like this: Logica: import redis Class Logica(): conexion...
asked by 20.04.2018 / 16:36
1
answer

How the function emit () works in python

I'm starting in python, today the teacher explained us about the function emit and I use the following example: from PyQt5.QtWidgets import QMainWindow,QApplication from PyQt5 import uic from PyQt5 import QtCore import threading class Princip...
asked by 11.12.2018 / 00:30
1
answer

Align text of items in a QTableWidget

I am trying to center the texts of an item of QTableWidget for which I occupy the following: self.tabla.insertRow(self.tabla.rowCount()) self.tabla.setItem(self.tabla.rowCount()-1,0,QTableWidgetItem(_id).setTextAlignment(QtCore.Qt.Align...
asked by 07.08.2018 / 00:24
1
answer

render a pygal graphic in a Qlabel

Good morning I'm trying to show a graph in a qlabel with pixmap and pygal, however it does not work, it throws me an error qn QPixmap from PyQt5 import QtCore, QtWidgets, QtSvg import pygal from PyQt5 import uic from PyQt5.QtGui import QPixmap...
asked by 14.09.2018 / 17:47
1
answer

Retrieve id in comboBox

I have the following function to fill a comboBox with the data entered in the form by the user, this works correctly. def onTextChanged(self, text): if text: sql = ("SELECT sec.Nombre as Seccion,sec,idSeccion FROM [Lote] lot \...
asked by 06.08.2018 / 12:55