Master PyQt5 part 6: QMainWindow for easy apps

  Рет қаралды 12,384

Alan D Moore Codes

Alan D Moore Codes

Күн бұрын

Author Alan D Moore discusses the features of the QMainWindow class, including menus, status bar, toolbars, and dockable widgets.
Follow Alan at www.alandmoore.com
Purchase a copy of Mastering GUI Programming with Python here: amzn.to/3Dr8cAy
Example code for this video can be found here: github.com/alandmoore/PyQt-Vi...
Previous video in this series: • Master PyQt5 part 5: M...
Music from this video: • Flamingo lake
Thanks for watching!

Пікірлер: 10
@jwnigel
@jwnigel 2 жыл бұрын
Thanks Alan, at this point I decided I needed to buy the book in order to keep up with you. Following along from Chiapas, Mexico.
@erikb7758
@erikb7758 4 жыл бұрын
Interesting note, following along on macOS, at ~10:30, working on adding "Quit" to the file menu. If you call your action "Quit" or "Exit" it will not show up in the menu. If you call it _Quit or Q_u_i_t it will show up, but you cannot add an action called literally Quit. Also of note, self.close DOES work when you call it something else. This is on macOS 10.15.5 for reference.
@eliazarinso8115
@eliazarinso8115 2 жыл бұрын
Hi, I run the code in the description and I have one question. The 'search' works to the opened txt file, but why does the 'search' doesn't work when I searched something to the sentence I've just typed in the textedit?
@gordonwilson1740
@gordonwilson1740 2 жыл бұрын
For those using PyQt6 (I couldn't load PyQt5), there are a couple minor changes to make this work. Line 64 at about 22:58 needs to be modified... line 64 --> self.addDockWidget(qtc.Qt.DockWidgetArea.RightDockWidgetArea, search_dock) The term "DockWidgetArea" has been added. Also, earlier moving the cursor to the start of the opened text file can either be commented out or modified as follows... line 88(?) --> self.textedit.moveCursor(qtg.QTextCursor.MoveOperation.Start) The term "MoveOperation" has been added. I'm using a Mac so maybe your experience will be different. I also found that "sys.exit(app.exec_())" on the last line did not work at all for me. Maybe Qt are going to claim the reserved word "exec" was for them. ; )
@gordonwilson1740
@gordonwilson1740 2 жыл бұрын
Another one... line 25 --> self.case_checkbox.checkState() == qtc.Qt.CheckState.Checked Added the term "CheckState"... == qtc.Qt.Checked ---> == qtc.Qt.CheckState.Checked
@gordonwilson1740
@gordonwilson1740 2 жыл бұрын
Yet another... line 96 --> qtg.QTextDocument.FindFlag.FindCaseSensitively Adds the term "FindFlag" before "FindCaseSensitively"
@johntobin9404
@johntobin9404 3 жыл бұрын
Thanks. When I copied the code (that I triple-checked for accuracy, I just get: class MainWindow(qtw, QMainWindow): NameError: name 'QMainWindow' is not defined I thought who knows? Maybe if I do from PyQt5 import QMainWindow maybe that would fix it. Do you or does anybody know why I might be getting that error?
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
It should be qtw.QMainWindow.
@johntobin9404
@johntobin9404 3 жыл бұрын
@@alandmoorecodes3585 Alrighty. Thanks, Alan. Will try that.
@Soljarag5
@Soljarag5 3 жыл бұрын
Why don't you pass *args and *kwargs for a Qmain window?
Master PyQt5 part 7: Using images and icons
18:14
Alan D Moore Codes
Рет қаралды 6 М.
QtDesigner and PyQt5:  The right and wrong way to use them together
37:16
Alan D Moore Codes
Рет қаралды 107 М.
ОСКАР ИСПОРТИЛ ДЖОНИ ЖИЗНЬ 😢 @lenta_com
01:01
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 96 МЛН
你们会选择哪一辆呢#short #angel #clown
00:20
Super Beauty team
Рет қаралды 50 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 16 МЛН
Tkinter vs. PyQt:  Which Python GUI framework is right for you?
38:11
Alan D Moore Codes
Рет қаралды 64 М.
Python Classes pt2: Building a class
30:46
Alan D Moore Codes
Рет қаралды 3 М.
Master PyQt5 part 10: Make responsive GUIs with Threads
33:35
Alan D Moore Codes
Рет қаралды 19 М.
Multiple Screens in PyQt5: Switch screens without opening a new window
11:43
Code First with Hala
Рет қаралды 92 М.
REST API Crash Course - Introduction + Full Python API Tutorial
51:57
Tkinter Basics 1: Setup, Widgets, and Geometry managers
26:00
Alan D Moore Codes
Рет қаралды 9 М.
Pass Data Between Windows - PyQt5 GUI Thursdays #25
10:27
Codemy.com
Рет қаралды 28 М.
CUDA Programming on Python
21:34
Ahmad Bazzi
Рет қаралды 1,1 МЛН
PyQt5 Designer + Python Stacked Widget Walkthrough
18:22
Jekyll&HydeTutorials
Рет қаралды 39 М.
Python Classes pt3:  5 signs that you need a class
31:33
Alan D Moore Codes
Рет қаралды 2,3 М.
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 1,2 МЛН
НЕ ПОКУПАЙ СМАРТФОН, ПОКА НЕ УЗНАЕШЬ ЭТО! Не ошибись с выбором…
15:23