В фреймворке PyQt (и PySide тоже) часто встречается настройка чего-либо с помощью так называемых флагов.
widget.setWindowFlags(Qt.Window)
Взаимодействие нескольких флагов делается с помощью бинарных (или побитовых) операторов.
Несколько флагов можно указать с помощью оператора "|"
list_item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
исключить флаг из уже имеющегося набора можно так
list_item.setFlags(list_item.flags() ^ Qt.ItemIsEnabled)
Добавить новый флаг к имеющимся можно так
list_item.setFlags(list_item.flags() | Qt.ItemIsEnabled)
А проверка наличия делается так
is_enabled = item.flags() & Qt.ItemIsEnabled > 0
Почему именно так? Всё дело в том как именно работают побитовые операторы. Но об этом в следующем посте.
#qt
Ventoy — fleshkani bir marta tayyorlab, keyin unga istagancha ISO faylni oddiy copy-paste qilib boot qiladigan dastur. Har safar Rufus kabi qayta format qilish shart emas.
Nega zo'r:
✅ Bitta fleshkada birqancha ISO fayllarni saqlasa bo'ladi
✅ ISO ni “yozish” shart emas — tashlab qo'yasiz xolos
✅ UEFI + Legacy BIOS ishlaydi
✅ Secure Boot qo‘llaydi
✅ 4 GB dan katta ISO ham bemalol ishlaydi
Masalan, 64 GB fleshka bo‘lsa ichiga:
Windows 10.iso
Windows 11.iso
Windows 7.iso
solib qo‘yasiz. Kompyuterni fleshkadan yoqasiz, menyu chiqadi — qaysi ISO kerak bo‘lsa tanlaysiz.
Batafsil to'liqroq tushunish uchun ushbu videoni ko'ring: link
📊Bizning barcha loyihalar | #ventoy
Ventoy
https://www.ventoy.net/en/index.html
Ventoy is an open source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files.
With ventoy, you don't need to format the disk over and over, you just need to copy the ISO/WIM/IMG/VHD(x)/EFI files to the USB drive and boot them directly.
You can copy many files at a time and ventoy will give you a boot menu to select them (screenshot).
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.
Most type of OS supported (Windows/WinPE/Linux/Unix/VMware/Xen...)
#Ventoy#bootableUSBdrive#ISO#OpenSource