Category : pyqt5

I want to access the coordinates outside the mousePress function. What I want is: call self.curve.scene().sigMouseClicked.connect(self.mousePress) when PushButton is pressed. But I am unable to return the values from mousePress function. Please help me. import sys import platform from PySide2.QtWidgets import QApplication, QWidget, QPushButton from PySide2 import QtCore, QtGui, QtWidgets from PySide2.QtCore import (QCoreApplication, QPropertyAnimation, ..

Read more

I’m having trouble with the layout of the following program. I want to insert a QHBoxLayout into the first row (or any row for that matter) of a QVBoxLayout. Goal is to achieve something like this: Here is what I have so far: import sys, os from PyQt5.QtWidgets import * from PyQt5.QtWebEngineWidgets import QWebEngineView from ..

Read more

Currently, I have some code that creates a QTableWidget. When you click on a QTableWidget cell, a label appears which shows the name of the item you clicked. Then, there is a menu button at the top which, when clicked, takes you back to the QTableWidget. I do this using QStackedWidgets, and everything works well ..

Read more

“` from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from datetime import * import sqlite3 import sys import time import datetime # ==== Creating Delegate TreeWidget (Start) class MyDelegateTreeWidget(QStyledItemDelegate): def __init__(self): QItemDelegate.__init__(self) def sizeHint(self, option, index): return QSize(50, 60) # ==== Creating Delegate TreeWidget (End) # ====== Creating Customized Tree Widget ..

Read more