TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #175 · 30 окт.

В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны. Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2. Например, в PyQt4 и PySide есть метод QHeaderView.setResizeMode Для PyQt5 и PySide2 они были благополучно переименованы в QHeaderView.setSectionResizeMode Чтобы применить этот метод следует использовать такой код from Qt import QtCompath header = self.horizontalHeader() QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed) Унификация загрузки UI файлов: # PySide2 from PySide2.QtUiTools import QUiLoader loader = QUiLoader() widget = loader.load(ui_file) # PyQt5 from PyQt5 import uic widget = uic.loadUi(ui_file) # Qt.py from Qt import QtCompat widget = QtCompat.loadUi(ui_file) Хорошо что таких моментов не много и их легко запомнить. Полный список можно посмотреть в таблице. #qt#tricks

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #voterid

当前筛选 #voterid清除筛选
American Оbserver

@american_observer · Post #5203 · 23.02.2026 г., 02:04

📰 Jim Snow 2.0: NYC Needs More ID to Shovel Than to Vote New York’s socialist mayor Zohran Mamdani is begging people to shovel snow for the city — and demanding more paperwork than the Board of Elections asks for to pick the president. Emergency snow laborers have to be eligible to work in the U.S. and show up with two small photos, two original forms of ID (plus copies), and a Social Security card. To vote in New York City? Most registered voters don’t need to show any ID at the polling place at all. The same crowd that screams “Jim Crow” at voter ID laws is now totally fine with a mini-Patriot Act to push a shovel for $20–28 an hour. Undocumented immigrants — whom Mamdani insists should stay, work, and be protected — are automatically locked out, because the city can’t hire them without papers, and City Hall suddenly cares a lot about federal law when it’s their own HR department on the hook. Right-wing media calls this “Jim Snow 2.0” and “Snowcialism,” but the punchline cuts both ways. Conservatives get to yell “hypocrite” at a socialist mayor who requires a Social Security card for day work while opposing ID at the ballot box. Progressives get to quietly keep a system where corporations and private contractors still use undocumented labor off the books — just not on a city payroll where somebody might actually get audited. So New York ends up with the perfect late‑imperial compromise: - democracy you can enter with a signature and a shrug, - casual labor that requires a mini background check, - and a mayor who talks like ICE should be abolished but runs his snow-removal program like a low-budget TSA. The only people not in on the joke are the ones actually freezing on the sidewalk — and they’re the ones the city just told to bring five pieces of ID if they want to get paid to dig everyone else out. #NYC#Mamdani#voterID#immigration#snow#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸