This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from functools import cached_property, partial | |
from PyQt6.QtCore import ( | |
pyqtSlot as Slot, | |
) | |
from utils import FrameProvider | |
import cv2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets | |
def main(): | |
print( | |
f"PyQt5 version: {QtCore.PYQT_VERSION_STR}, Qt version: {QtCore.QT_VERSION_STR}" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os.path | |
from PyQt5.QtWidgets import QApplication, QVBoxLayout, QWidget | |
from PyQt5.QtWebEngineWidgets import QWebEngineView | |
from PyQt5.QtWebEngineCore import QWebEngineUrlRequestInterceptor | |
import folium | |
from qfolium import FoliumApplication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _patch(): | |
import os | |
import sys | |
import importlib.util | |
module_path = os.path.join( | |
os.path.dirname(os.path.realpath(__file__)), "QtSiteConfig.py" | |
) | |
spec = importlib.util.spec_from_file_location("QtSiteConfig", module_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
from PyQt5.QtWidgets import * | |
import sys | |
from math import sqrt | |
class LogObject(QObject): | |
hovered = pyqtSignal() | |
notHovered = pyqtSignal() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE TS> | |
<TS version="2.1" language="es"> | |
<context> | |
<name>Form</name> | |
<message> | |
<location filename="main_ui.py" line="31"/> | |
<source>Form</source> | |
<translation>Formulario</translation> | |
</message> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | |
<script>L_PREFER_CANVAS=false; L_NO_TOUCH=false; L_DISABLE_3D=false;</script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css"/> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide2 import QtCore, QtGui, QtWidgets | |
class InfoBox(QtWidgets.QGraphicsItem): | |
Type = QtWidgets.QGraphicsItem.UserType + 1 | |
def __init__(self, parent=None): | |
super(InfoBox, self).__init__(parent) | |
self.setZValue(4) | |
proxy = QtWidgets.QGraphicsProxyWidget(self) | |
widget = QtWidgets.QLabel("TEST!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5 import QtCore, QtWidgets | |
class MainWindow(QtWidgets.QMainWindow): | |
def __init__(self, parent=None): | |
super(MainWindow, self).__init__(parent) | |
self._gv = QtWidgets.QGraphicsView() | |
self.setCentralWidget(self._gv) | |
self._gv.viewport().installEventFilter(self) | |
def eventFilter(self, obj, event): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5 import QtCore, QtGui, QtWidgets | |
def copy_widget(w): | |
if isinstance(w, QtWidgets.QWidget): | |
new_w = type(w)() | |
if isinstance(w, QtWidgets.QComboBox): | |
vals = [w.itemText(ix) for ix in range(w.count())] | |
new_w.addItems(vals) | |
return new_w |
NewerOlder