PyQt Images and qrc files

  Рет қаралды 13,222

MadPonyInteractive

MadPonyInteractive

Күн бұрын

In this video we will learn how to display images in our application as well and work with resource (.qrc) files.
Timestamps:
00:00 Intro
00:40 Folder structure
01:57 Create resource file
03:10 Using styleSheets
04:36 Using a background image
05:50 Using a Label as image
07:32 Images in buttons
09:27 Tooltips and cursors
10:13 Compiling .qrc files
11:43 Convert to executable
Relevant Links
PyQt & PySide Course Playlist: • PyQt6 & PySide6 Course
Qt Resource Files Documentation: doc.qt.io/qtforpython/overvie...
CSS Tutorials: www.w3schools.com/css/default...
PyInstaller Documentation: pyinstaller.readthedocs.io/en...
Support me on:
gumroad.com/mad_pony_interactive
/ madponyinteractive
madponyinteractive.artstation...
flippednormals.com/creator/ma... www.buymeacoffee.com/MadPonyInt

Пікірлер: 8
@michealkinney6205
@michealkinney6205 Жыл бұрын
I never knew you could just type CMD in the navigation dialog and it would resolve the path within CMD. That was a nonchalant way of learning something amazing. Thanks
@MadPonyInteractive
@MadPonyInteractive Жыл бұрын
Yeah that is such an handy tip :)
@yolosingh-nt4hv
@yolosingh-nt4hv Жыл бұрын
Thanks for sharing:)
@lohitsgameplaykalpx
@lohitsgameplaykalpx 10 ай бұрын
thanks bruh!
@wasa01234567899
@wasa01234567899 3 ай бұрын
ty man i really have a big laugh at 9:02 with that trick hahaha
@topografoenggeografoangola174
@topografoenggeografoangola174 2 жыл бұрын
Thanks u very much 👏
@euripedesfilho259
@euripedesfilho259 2 жыл бұрын
hi man thanks for all but i've a question in class class PySide6Ui(): what you writing next? from PySide6.QtWidgets import QApplication, QWidget import subprocess import xml.etree.ElementTree as xml class PySide6Ui():??????????? app QApplication([]) from_class, base_class = PySide6Ui('controle.py').load() win = base_class() form = from_class() form.setupUi(win) win.show() app.show()
@MadPonyInteractive
@MadPonyInteractive 2 жыл бұрын
class PySide6Ui: """ class to load .ui files to memory or convert them to .py files based on: stackoverflow.com/a/14195313/3781327 usage: PySide6Ui('myUi.ui').toPy('myUi.py') PySide6Ui('myUi.ui').toPy() PySide6Ui('myUi.ui').load() """ def __init__(self, ui_file): self.__ui_file = ui_file def __getUi(self): return subprocess.check_output(['pyside6-uic', self.__ui_file]) def toPy(self, py_file=None): py_file = py_file or self.__ui_file.replace('.ui','.py') uipy = self.__getUi() try: # Write the file with open(py_file, 'w') as f: f.write(uipy.decode("utf-8")) return True except: return False def load(self): uipy = self.__getUi() parsed = xml.parse(self.__ui_file) widget_class = parsed.find('widget').get('class') form_class = parsed.find('class').text pyc = compile(uipy, '', 'exec') frame = {} exec(pyc, frame) form_class = frame['Ui_%s'%form_class]# Ui_MainWindow or Ui_Form base_class = eval('%s'%widget_class)# QMainWindow or QWidget return form_class, base_class
PyQt Custom Info System
29:32
MadPonyInteractive
Рет қаралды 2,3 М.
Smart Sigma Kid #funny #sigma #memes
00:26
CRAZY GREAPA
Рет қаралды 7 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 120 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 51 МЛН
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 115 М.
Working With Qt Designer's UI Files And PyQt
19:17
DistroTube
Рет қаралды 16 М.
3. Python   PyQt Containers and Layouts
12:07
PanoPython
Рет қаралды 1,5 М.
File Dialog Boxes With QFileDialog - PyQt5 GUI Thursdays #29
12:47
PyQt QPainter Quickstart
21:45
MadPonyInteractive
Рет қаралды 4,5 М.
Styling PyQt Applications
19:58
MadPonyInteractive
Рет қаралды 7 М.
How to use .QRC files & the Qt Resource System
5:25
Pixel Heart
Рет қаралды 3,7 М.
The Most Advanced Humanoid Robot Ever Created (Stunning)
8:39
Matthew Berman
Рет қаралды 28 М.
PyQt paintEvent()
15:11
MadPonyInteractive
Рет қаралды 4,6 М.
Smart Sigma Kid #funny #sigma #memes
00:26
CRAZY GREAPA
Рет қаралды 7 МЛН