Questions tagged as 'pyqt5'

1
answer

StackedWidget, fails to show interface.ui

I have a problem, I try to use a stackedwidget to change the contents of my main window but not the one in the taskbar. this is my code: from PyQt5.QtWidgets import QMainWindow,QApplication,QMenu from PyQt5 import QtCore,QtGui,QtWidgets fro...
asked by 10.07.2018 / 23:26
1
answer

specgram in mainwindow

I am generating an audio spectrum analyzer .. I have already managed to generate the analyzer with certain features that I need, however, I can not make the resulting graphic representation appear in the main window, or that the background co...
asked by 25.03.2018 / 06:27
1
answer

AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'

Code: from PyQt5 import QtGui import sys app = QtGui.QApplication(sys.argv) window = QtGui.GWidget() window.show() Could you tell me why this error comes out, please. AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'...
asked by 28.05.2016 / 19:31
1
answer

How to delete or clean a tablewidget in Pyqt5 or Pyqt

Hello People, how can you erase or clean a tablewidget in Pyqt5 or Pyqt ? self.obj_form_cliente ---> esto es el formulario tw_garantes_lista ---- > esto es como se llama el control "nombre de del control tipo tablew...
asked by 02.09.2016 / 22:35
1
answer

QTableWidget, center text and change color to a specific VerticalHeader

I'm making a table with QTableWidgetItem , the problem that occurs to me is in VertialHeader I need the text to be centered and to define a different text color to some items; for example the item ( Gastos must be red)....
asked by 01.09.2018 / 07:15
1
answer

How to show a graph with pygal in QMainWindow

I'm trying to show a graph x in a QMainWindow using pygal however the graph is not shown, this is the code I'm using from PyQt5.QtWidgets import QMainWindow,QApplication from PyQt5.QtCore import QDate import pygal class Principal(QMainWindo...
asked by 07.09.2018 / 04:51
1
answer

Associate an event double click on a QTableWidget to a slot and get the row

I am trying to double-click on the row of a table to call the method and know which row it is. I tried to do: def Tabla(self): #Boton de exportar a excel toolButton = QtWidgets.QToolButton() icon1 = QtGui.QIcon() icon1.addPixma...
asked by 23.08.2018 / 11:16
2
answers

Why does grid layout only show me one button?

I'm trying to interface with PyQt5. I have copied an example of the internet where it shows how to make a grid and add widgets, but when I add 3 buttons it only shows me 1. What am I doing wrong? This is the code: import sys from PyQt5 impo...
asked by 26.07.2018 / 11:10
1
answer

Resize image with QPixmap

I'm trying to change the size of the image but it does not work, this is the code: pixi = QtGui.QPixmap.fromImage(image) pixi.scaledToWidth(150) pixi.scaledToHeight(150) self.label.resize(150,150) self.label.setPixmap(pixi) but...
asked by 18.07.2018 / 08:01
1
answer

Deactivate QMenu self-selection

A simple question how can I disable the auto-selection of a qmenubar. what I want to deactivate is the option that when clicking on a Qmenu the click action remains when passing to the other buttons     
asked by 19.07.2018 / 04:24