Categories
Mastering Development

ValueError: could not convert string to float: when using matplotlib, arduino and pyqt5

While using an arduino code (also connecting pin 13 to A0 in an arduino uno) to have changing values int PinOutput = 13; int PinInput = A0; int inph; int inpl; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(PinInput, INPUT); pinMode(PinOutput, OUTPUT); } void loop() { // put your […]

Categories
Mastering Development

How to capture output of external python script in a PyQt5 QTextEdit? [duplicate]

I am trying to run an external Python script and capture the printed output in a PyQt5 QTextEdit, but that code only captures its own (prueba.py) output. The main.py script calls prueba.py (PyQt5 window) witch execute the target script (detect.py) prueba.py # -*- coding: utf-8 -*- # Form implementation generated from reading ui file ‘prueba.ui’ […]

Categories
Mastering Development

How to Assign Keyboard Input to push button on GUI (Python)

def FunctionAlgo(): import cv2 from PIL import Image import numpy as np import sys import glob import os from subprocess import call from urllib.request import urlopen from collections import Counter import json from pathlib import Path import re import webbrowser cf = 0 ResultStr = [ ” ] def LogicOpStrings ( ) : l = […]

Categories
Mastering Development

How to add second push button with function on another py file [closed]

What I would like to do is to add 3 push buttons. The code below works on calling the first for the push bush button, but it crashes when trying to add a second button. The GUI vanishes and the program.py runs directly. How can I add the second push button in my code? from […]

Categories
Mastering Development

change dynamically data dash in pyqt5

So I made an App that shows dash graphs inside a pyqt5 which takes data from a table widget. the App fonctions well at the first data but after if I change the data in the table i can’t see changes in the graph as well, so can where is the problem occurring? # -*- […]

Categories
Mastering Development

Drawing over an image QLabel pqyt5

I have 2 different Qlabel I am able to click on my load Image button to load an image and show it on QLabel but now I was trying to implement a function where I can edit(paint over the loaded picture). Original Image Image is loaded on the GUI and I have painted over the […]

Categories
Mastering Development

how to put a window inside another window employing mdiArea in from the menu, using PYQT5 and Python 3?

I have used Qt designer 5 to create three different windows, the principal MainWindows.py the subwindows subVENTANA1.py and subVENTANA2.py How can I call the sub-windows from MainWindows.py, with the use of mdiArea? In MainWindows.py only have a menu bar, in this menu there are several subMenus, in this case 2 submenus. I´ve tried did but […]

Categories
Mastering Development

ImportError: DLL load failed while importing QtCore, QtGUI

I just upgraded my Python to 3.8.3 and pyside2 to 5.15.0 and now it’s showing me: from PySide2 import QtCore, QtGui, QtWidgets ImportError: DLL load failed while importing QtCore: The specified module could not be found. My Environment variables are in the path and I have the latest version of both Python and PySide2… Why […]

Categories
Mastering Development

How to set the interval on the x-axis (horizontal)

From time to time I returned to the code that eyllanesc helped me with. Need to display every 6 placemarks on the axis. It would also be better to display datetime(date) [datetime.date(1991, 2, 4) datetime.date(1991, 2, 5) datetime.date(1991, 2, 6) … datetime.date(2019, 7, 31) datetime.date(2019, 8, 1) datetime.date(2019, 8, 2)] instead of indexes (0, 1, […]

Categories
Mastering Development

I’m trying to make my PyQt GUI code in OOP way

I’m trying to make my PyQt5 GUI in OOP way for example class for window and another for Pushbutton I’m really confiuse how to make it.Here is my code and my try to make pushbutton class.also my goal is to make classes for each of the items in the window from PyQt5 import QtCore, QtGui, […]