В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
Greenland Is Next
European leaders have dramatically rallied together in support of Denmark and Greenland after one of Trump’s leading aides suggested the US may be willing to seize control of the Arctic territory by force.
Starmer, the UK prime minister, Emmanuel Macron, the French president, and Merz, the German chancellor, declared that Greenland – a semi-autonomous territory of the kingdom of Denmark – “belongs to its people”, in a rare European rebuke to the White House.
“It is for Denmark and Greenland, and them only, to decide on matters concerning Denmark and Greenland,” the three leaders said in a statement on Tuesday made jointly with the prime ministers of Denmark, Italy, Poland and Spain.
Later in the evening, Starmer repeated British support for Denmark at a press conference in Paris where Trump’s special envoy, Steve Witkoff, and son-in-law, Jared Kushner, were present.
“I’ve been very clear as to what my position, the position of the UK government is,” the British leader said.
But, anxious to avoid deepening the transatlantic rift, Starmer, Macron and Merz chose to focus on making fresh security commitments to Ukraine, at an event aimed at bolstering support for Kyiv planned before the Greenland crisis broke.
On Monday night, Stephen Miller, the US president’s influential deputy chief of staff for policy, said “nobody [was] going to fight the United States militarily over the future of Greenland” when asked to rule out using force.
In an interview with CNN, Miller said military intervention would not be needed in order to gain control over Greenland because of its small population.
The European leaders emphasised that security in the Arctic had to be achieved collectively with Nato allies, rather than by the US seizing control of another Nato member’s territory.
“Nato has made clear that the Arctic region is a priority and European allies are stepping up,” the statement said.
“We and many other allies have increased our presence, activities, and investments, to keep the Arctic safe and to deter adversaries.”
Denmark and Greenland asked to meet the US secretary of state, Marco Rubio, urgently to “discuss the significant statement made by the United States about Greenland”, Greenland’s foreign minister, Vivian Motzfeldt, wrote on social media.
Lord Ricketts, a former UK national security adviser, warned that if the US were to annex Greenland it would be disastrous for Nato, amounting to, “for all practical purposes, the end of an alliance which is based essentially on trust”.
Security relationships such as the coalition of the willing in support of Ukraine, led by the UK and France and supported by Germany, would “take on a much greater significance alongside bilateral defence links with the US”.
Greenland long been a “good American ally,” Nathanielsen said , but this “does not transfer into an acceptance of - or interest in becoming Americans.”
Greenland’s prime minister, Jens-Frederik Nielsen, also made a strong statement in which he urged Trump to give up his “fantasies about annexation” and accused the US of “completely and utterly unacceptable” rhetoric. “Enough is enough,” he said.
During the second world war, when Denmark was occupied by Germany, Greenland was occupied by the US and returned to Denmark in 1945.
The US has had a military base in Greenland, which is important for its ballistic missile early warning system, at Pituffik (previously Thule) since the cold war.
In recent years there has been growing support for Greenlandic independence, particularly after revelations about Denmark’s treatment of Greenlandic people – including the IUD scandal – during and since colonial rule.
But amid the spectre of Trump’s threat, Greenland in March formed a new four-party coalition government in a show of national unity, with the first page of the coalition agreement stating: “Greenland belongs to us.”
#greenland#trump#denmark#nielsen
📱American Оbserver - Stay up to date on all important events
🇺🇸
#Sinfonía1#Nielsen#RobertSpano
Título:Sinfonía Nº 1 en sol menor Op.7
Autor:Carl Nielsen
Movimientos:
🎵I. Allegro orgoglioso
🎵 II. Andante
🎵 III. Allegro comodo,
🎵 IV. Allegro con fuoco
Interpretación:
Sinfónica de Galicia
Director:
Robert Spano
Fuente:🎼
@ClasicaAlAtardecer
#Sinfonía1#Nielsen#RobertSpano
SINFONÍA Nº 1 EN SOL MENOR OP.7
La “Sinfonía Nº 1 en sol menor” Op.7 fue empezada en Berlín en 1890 y terminada en 1892 por Carl Nielsen. Como es natural la dedicó a su esposa Anne Marie que había seguido su génesis. Se estrenó en 1894 en Copenhague con la Orquesta Real dirigida por Johan Svendsen, con el compositor en su sitio entre los segundos violines. Tuvo que levantarse al final de la interpretación para agradecer los generosos aplausos que le tributó el público.
La sinfonía tiene cuatro movimientos, indicados como sigue:
🎵 I. Allegro orgoglioso
🎵 II. Andante
🎵 III. Allegro comodo,
🎵 IV. Allegro con fuoco
El primer movimiento allegro orgoglioso, inaugura los calificativos que más adelante atribuirá a sus movimientos. Desde el primer motivo nos encontramos con un aire nuevo. Aunque es una obra tonal siguiendo la tradición germánica, con una armonía post-romántica, nos revela su personal idiosincrasia, su nuevo modo de ver las cosas. Su tratamiento especial de la tonalidad se intuye, lo que más tarde le llevará a la tonalidad progresiva.
El primer tema es atrevido y con variantes cromáticas. En parte está influenciado por el conocimiento de la música folclórica danesa. La flauta y el oboe proporcionan el material para el segundo tema, una melodía expresiva instrumentada solo para viento. La exposición se repite para dar más fuerza expresiva. Sigue el desarrollo que lleva al clímax del movimiento. Configurado de modo clásico, termina con la reexposición y una coda basada en el tema inicial.
El segundo movimiento, andante, es de carácter pastoral, con una serena melodía que aumenta en intensidad en la parte central del movimiento, para luego volver a la serenidad de su principio. Una página con un fuerte acento lírico nórdico.
El tercer movimiento, allegro comodo, corresponde al scherzo de la obra. Dos temas forman la primera parte. Un tema sinuoso y otro más tierno. El trío está confiado al metal en forma de coral. Luego vuelve a repetirse el scherzo, pero el coral interpretado por el metal retorna antes de terminar el movimiento.
Termina con un allegro con fuoco de ímpetu irresistible. Con una estructura similar al primer movimiento en forma sonata, fácil de seguir, dos temas se contraponen, el primero caballeresco y un segundo con un cierto sabor oriental. La exposición se repite y el desarrollo central empieza con suavidad para llegar al clímax del movimiento. Luego retorna al material del principio en la recapitulación y acaba de modo triunfal.
En 1893 nace su hija Anne Marie que se convertiría en una importante pintora. Su hijo pequeño, Hans Børge nace en 1895. Nielsen vivía unos años felices y esto lo expresó en su cantata “Hymnus Amoris” Op.12, escrita entre 1896 y 1897, dedicada a su esposa. En esta época empezó su primera ópera “Saul og David” FS 25, terminada en 1901 y estrenada en 1902.
@ClasicaAlAtardecer
🔮Гадаю на трендах, читаю карту «9 пентаклей» отчет Нильсен про тренды в FMCG 2025
Гигантский материал о тенденциях на рынке FMCG и в ритейле, которые будут определять поведение потребителей в 2025 году.
Файл аж в 108 страниц прикреплен после поста
Что внутри?
1. Персонализация
Потребители стремятся к уникальным продуктам, учитывающим индивидуальные предпочтения. Например, рост спроса на персонализированные витаминные комплексы и чекапы с индивидуальным подбором нутриентов в фарме и медицинском ритейле.
2. Внимание к себе
Усиление заботы о личном здоровье и благополучии. Тренд проявляется в росте интереса к ментальному здоровью и персонализированным оздоровительным практикам.
3. Регионализация
Рост доходов и покупательской способности в различных регионах России. Появление локальных брендов и адаптация международных под российский рынок с учетом региональной специфики.
4. Цифровизация
Развитие онлайн-сервисов и digital-решений в потреблении. Рост продаж через маркетплейсы, увеличение доли онлайн-покупок и цифровых сервисов в различных категориях.
5. Удовольствие и эмоции
Активный рост категорий, связанных с получением удовольствия: снеки, напитки с необычными вкусами, перекусы. Потребители готовы тратить на продукты, дарящие эмоциональное удовлетворение.
6. Здоровое питание
Устойчивый тренд на ЗОЖ с развитием категорий без сахара, лактозы, с растительными альтернативами. Рост спроса на функциональные продукты и добавки, поддерживающие здоровье.
#трендомарафон2025#Nielsen#FMCG
👇
#отчёт#Nielsen за 2025 год — Мир #маркетинга вошёл в фазу «умного сокращения»
54% маркетологов по всему миру режут бюджеты.
Растёт больше не только Digital, внимание снова делят с ТВ, наружкой и CTV.
Retail Media становится полноценным full-funnel-каналом.
Нейросети главный тренд года: от оптимизации медиа до генерации контента.
Бренды ищут баланс между узнаваемостью и выручкой.
Главная проблема — измерения.
Только треть компаний умеет видеть кампанию целиком, digital и offline вместе.
🇬🇱#Groenlandia – Il primo ministro danese Mette #Frederiksen ha affermato su X di aver avuto, insieme all'omologo groenlandese Jens Frederik #Nielsen, un: "colloquio costruttivo" con il segretario di Stato Usa Marco #Rubio sul destino della grande isola artica; ha aggiunto: "Continueremo come concordato nel gruppo di lavoro di alto livello"
@UltimoraPolitics24