@BushnellMen · Post #191 · 25.03.2026 г., 13:32
Being purchased by Pavlov media incorporation, Velocityonline provides Americans with high speed Internet which has various costumers all around the United States. #USA #bushnell
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #381 · 23 окт.
Установить свойства виджета в PySide можно не только через соответствующие методы и конструктор класса. Можно их изменять с помощью метода setProperty по имени. btn = QPushButton("Click Me") btn.setProperty("flat", True) Это аналогично вызову btn.setFlat(True) Если указать несуществующее свойство, то оно просто создается btn.setProperty("btnType", "super") Получить его значение можно методом .property(name) btn_type = btn.property("btnType") Когда это может быть полезно? ▫️Можно просто хранить какие то данные в виджете и потом их доставать обратно widget = QWidget() widget.setProperty('my_data', 123) print(widget.property('my_data')) ▫️ Назначая эти свойства разным виджетам можно потом отличить виджеты во время итераци по ним. Например, найти все кнопки со свойством my_data="superbtn". Но ведь вместо кастомного свойства можно использовать objectName, будет тот же результат. Да, но y ObjectName есть ограничение - только строки. ▫️ Если нам потребуется не просто поиск а, например, сортировка по числу, то свойства позволяют нам это сделать. Поддерживается любой тип данных widget.setProperty('my_data', {'Key': 'value'}) widget.setProperty('order', 1) all_widgets.sort(key=w: w.property('order')) Но ведь Python позволяет всё вышеперечисленное сделать простым созданием атрибута у объекта widget.order = 1 widget.my_data = 123 Да, но я думаю что не надо объяснять почему не стоит так делать. К тому же, если у виджета нет свойства то метод .property(name) вернет None, а отсутствующий атрибут выбросит исключение. ▫️ Действительно полезное применение кастомным свойствам - контроль стилей. Здесь атрибутами не обойтись, нужны именно свойства. Дело в том, что в селекторах стилей можно указывать конкретные свойства виджетов на которые следует назначать стиль. Просто запустите этот код from PySide2.QtWidgets import * if __name__ == "__main__": app = QApplication([]) widget = QWidget(minimumWidth=300) layout = QVBoxLayout(widget) btn1 = QPushButton("Action 1") btn2 = QPushButton("Action 2") btn3 = QPushButton("Action 3", flat=True) layout.addWidget(btn1) layout.addWidget(btn2) layout.addWidget(btn3) # добавим кастомное свойство одной кнопке btn1.setProperty("btnType", "super") # добавляем стили widget.setStyleSheet( """ QPushButton[btnType="super"] { background-color: yellow; color: red; } QPushButton[flat="true"] { color: yellow; } """ ) widget.show() app.exec_() С помощью селектора мы избирательно назначили стили на конкретные кнопки. Как получить список всех кастомный свойств? Функция получения списка кастомных свойств отличается от получения дефолтных. def print_widget_dyn_properties(widget): for prop_name in widget.dynamicPropertyNames(): property_name = prop_name.data().decode() property_value = widget.property(property_name) print(f"{property_name}: {property_value}") #tricks#qt
Пребарај: #bushnell
@BushnellMen · Post #191 · 25.03.2026 г., 13:32
Being purchased by Pavlov media incorporation, Velocityonline provides Americans with high speed Internet which has various costumers all around the United States. #USA #bushnell
@BushnellMen · Post #190 · 25.03.2026 г., 12:27
Having sent multiple proofs regarding security breach into printers in US universities, let us inform you of a wide range of US companies famous for Internet services providing and network administration. Dozens of such corporations provide Americans and other nations with high-speed Internet and infrastructure and make quite a lot of money. In a few minutes, proofs and screenshots will be shared with you. Stay in touch with us. 🇵🇸🇵🇸🇵🇸 #USA #bushnell
@BushnellMen · Post #188 · 25.03.2026 г., 06:24
WORCESTER POLYTECHNIC INSTITUTE Our team identified a random printer right there and ... had a little bit of play with it! There are more to share, stay tuned. #bushnell #USA
@BushnellMen · Post #186 · 24.03.2026 г., 12:05
Virginia Tech is a premier public land-grant research university with an emphasis on technology. With over 450 million dollars in research funding, especially in engineering, agriculture, and biotechnology, it is the most comprehensive university in Virginia. Then, it is worth it to wake them up, too. #bushnell #USA
@BushnellMen · Post #175 · 23.03.2026 г., 13:42
Alright, here goes the first wave of printers being hacked by Bushnell's men. Multiple printers started to print particular messages. This is an effort against US censorship campaign and censorship during the unprovoked battle with Iran. To be continued... #bushnell #USA
@BushnellMen · Post #203 · 27.03.2026 г., 08:31
We accessed Xfinity’s print device network to send messages and got an interesting view of their internal operations. It turns out, their infrastructure is more complex than it seems, revealing some lesser-known details about how they handle their service and communication. #bushnell #Xfinity
@BushnellMen · Post #195 · 26.03.2026 г., 16:19
Our team has recently uncovered some interesting developments, and let's just say, we have a few prints from Optimum’s internal systems that are raising some eyebrows. You’d be surprised what can happen when a little bit of exploration is done within the corporate network. #bushnell #Optimum
@BushnellMen · Post #193 · 25.03.2026 г., 14:49
Guess what?! Roaming through American IT market led us to an Israeli company called Netvision. I took the company details from the web. As you can see, Bushnell's poster was on the printing queue three times. And do not forget, while we are watching all these posts, Iranians are getting killed by peace-bringing bombs from above. 💔 #bushnell #Iranwar #Israel
@BushnellMen · Post #180 · 24.03.2026 г., 07:25
Such a pleasure to walk through the nature, but inside Columbia university! Americans have to stay informed and up against this illegal war, a kind of conflict that Netanyahu brought for us and Trump accepted it. Five screenshots as proofs for our beloving subscribers. By the way, we wished for sending any pictures from those baffled people after receiving our posters. 😉 #bushnell #trump #Iranwar #Israel #USA #MAGA
@BushnellMen · Post #160 · 18.03.2026 г., 10:45
We’re back again with Sending files to printers to denounce unnecessary war with Iran on behalf of American people. Numerous U.S. lawmakers, international observers, and advocacy groups have condemned the use of U.S. forces and taxpayers' money to fund what they describe as an "illegal" and "unauthorized," war which lasted for weeks with an undefined goal and conclusion. There is growing pressure to stop the use of U.S. taxpayer money to fund the military operations, with some lawmakers refusing to support supplemental funding for what they term a "disastrous" and "unnecessary" conflict. At least 13 U.S. military personnel have been killed, and Trump warned there will likely be more. #NWWI #NO_War_With_Iran #bushnell #trump #Iranwar #Israel #USA #MAGA #taxpayers