How To Create Combo Boxes - PyQt5 GUI Thursdays #2

How To Create Combo Boxes - PyQt5 GUI Thursdays #2

Codemy.com

3 года назад

45,706 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@ahsanyousuf9011
@ahsanyousuf9011 - 28.01.2021 20:57

1st view 1st comment

Ответить
@elitecoder9246
@elitecoder9246 - 28.01.2021 21:04

i liked this video two times 😂😂😂

Ответить
@elitecoder9246
@elitecoder9246 - 28.01.2021 21:10

how to create my own gui library in python as tkinter?

Ответить
@komodojackgaming7802
@komodojackgaming7802 - 28.01.2021 21:31

You know why i no longer comment that 'yay one of first ones to comment'? Well its because that im always one of the first ones to comment!!!¡¡ ha ha ha ha LOL

Ответить
@BCmodo
@BCmodo - 28.01.2021 22:05

Thursday is from now my favourite day :)

Ответить
@s.aravindh6227
@s.aravindh6227 - 28.01.2021 22:07

👍👍👍👍

Ответить
@danielzheleznov72
@danielzheleznov72 - 29.01.2021 00:43

Hey what is your favorite gui designer in python. What i mean is which one do tou likek the most pyqt, tkinter, or kivy?

Ответить
@alexisdiniz8215
@alexisdiniz8215 - 29.01.2021 02:14

hello, the Qwidget that the class inherits would be like passing root or the main window in tkinter, right? and the other question: if you want a button to open a window as a topLevel in tkinter, should you call a method of the same class or instantiate another class?

Ответить
@AaronEstebanSEO
@AaronEstebanSEO - 29.01.2021 03:51

Great video. You should continue on with more PyQt5 gui videos. I'd like to see you cover the tables eventually

Ответить
@hiwab41
@hiwab41 - 29.01.2021 10:14

Wow 🤩

Ответить
@brunoimai8978
@brunoimai8978 - 29.01.2021 12:33

I don't know if that was already in the plans, but could you do a video on doing a "next" button, to take the user to another window? I tried doing that and failed miserably, thank you!

Ответить
@TOP123ization
@TOP123ization - 04.02.2021 05:12

Hi, how can we do a relative combox? thanks

Ответить
@nabeelshoukat2133
@nabeelshoukat2133 - 07.02.2021 13:24

hey sir, please help me how to resize widgets to fit screen while resizing the window in Pyqt5 Please

Ответить
@legendarynick5425
@legendarynick5425 - 07.02.2021 16:50

👌👌👌👌👌

Ответить
@katmanduYT
@katmanduYT - 17.02.2021 08:05

keep this series going, thank you so much

Ответить
@wizrider888
@wizrider888 - 06.03.2021 22:33

when using the addItems method, is there a way to add both text and data?

Ответить
@someoneontheinternetuvenev6268
@someoneontheinternetuvenev6268 - 01.04.2021 23:56

Cant even make a hero joke on this.
You are both the hero we needed and wanted!

Ответить
@wolfgang2587
@wolfgang2587 - 01.05.2021 23:16

Great videos. Thank you. 😊

Ответить
@ahsanyousuf9011
@ahsanyousuf9011 - 17.05.2021 12:27

But John, how to set placeholder text, means unselectable text??

Ответить
@stevenalexander6262
@stevenalexander6262 - 24.06.2021 15:15

weeeeeeeeeeeeeeeeeeeee

Ответить
@ak7syoutubechannel51
@ak7syoutubechannel51 - 26.06.2021 17:33

What python idle u are using

Ответить
@thelostman5625
@thelostman5625 - 10.07.2021 17:52

How can we add padding to the drop-down items?

Ответить
@saisornanathanct2660
@saisornanathanct2660 - 05.09.2021 07:01

why r u using classes for PyQt5
instead we can write snippets with out classes and objects ??

Ответить
@jeremyho4674
@jeremyho4674 - 08.11.2021 11:30

Why I can't insert things at the top ??
Code:

import PyQt5.QtWidgets as qtw
import PyQt5.QtGui as qtg

class MainWindow(qtw.QWidget):

def __init__(self):

super().__init__()

self.setWindowTitle("Hello world !!!")

# Create Vertical Layout

self.setLayout(qtw.QVBoxLayout())

# Create a Label

my_label = qtw.QLabel("Pick something from the list below !")

my_label.setFont(qtg.QFont("Helvetica" , 24))

self.layout().addWidget(my_label)

# create a combo box

my_combo_box = qtw.QComboBox(self , editable = True ,
insertPolicy = qtw.QComboBox.InsertAtTop)

my_combo_box.addItem("Pepperoni")
my_combo_box.addItem("Cheese")
my_combo_box.addItem("Pizza")
my_combo_box.addItem("Cookie")

self.layout().addWidget(my_combo_box)

# Create a Button

my_button = qtw.QPushButton("Enter" , clicked = lambda: Button_Press())

self.layout().addWidget(my_button)

# Show the App

self.show()

def Button_Press():

my_label.setText(f"You Picked {my_combo_box.currentText()} !")


app = qtw.QApplication([])

mw = MainWindow()

# Run the App
app.exec_()

Ответить
@ApplySkills
@ApplySkills - 28.11.2021 02:37

Hi, anyone body why when you create any widget you don't reference self like "self.my_label" or "self.my_combo"?

Ответить
@JamieJoystick
@JamieJoystick - 06.01.2022 21:44

Can you add a dictionary with addItems to also import data?

Ответить
@almaghror1
@almaghror1 - 17.02.2022 23:12

I should always pick John Elder.

Ответить
@Carelli19
@Carelli19 - 23.04.2022 11:59

how to insert text after selecting a combox item

Ответить
@eddw123
@eddw123 - 05.07.2022 22:26

👍Very good tutorial, I wrote the full script as John did it, but running the script without the related lines for ‘my_entry’, the script just shows a white screen😵…So, in my case the script works if I don’t delete the lines for ‘my_entry’ with a small modification in the line of the >self.layout< replacing the assignation of ‘my_entry’ with ‘my_combo’🤪

Ответить
@kabir73722
@kabir73722 - 11.01.2023 01:00

Thanks Alot Dear

Ответить
@kzazar_cz2481
@kzazar_cz2481 - 12.01.2024 12:45

i seem to get "DeprecationWarning: sipPyTypeDict() is deprecated, the extension module should use sipPyTypeDictRef() instead
class mainwindow(qtw.QWidget): " i dont know how to fix it. after i look it up i tried updating python and that didnt help. please help

Ответить
@begzodasidev
@begzodasidev - 16.04.2024 20:27

Always i see your videos but sometimes i forget subscribe and press like button😊😊. Sorry!

Ответить
@haithemabdelmoumenathmani1386
@haithemabdelmoumenathmani1386 - 14.05.2024 17:12

Dude why you wearing a bra

Ответить