В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
⚡️🇷🇺🇺🇦⚡️ Two Majors #Summary for the Morning of 13 March 2025; 06:46 (GMT+3)⚡️
🎯 Enemy Sources reported another wave of strikes using FABs with UMPC, OTRK, and 'Geranium' drones. Explosions were reported in the #Sumy, #Kherson, #Nikolayev, #Odessa, #Khmelnitsky, #Dnepropetrovsk, #Zaporozhye, #Kiev and #Cherkassy regions.
🔹 In #Kursk Region, the key event was the liberation of #Sudzha.🗺👆 Russian forces have full control of the city, conducting clearing operations against remaining enemy fighters hiding in basements and shelters. The settlements of #Podol and #Melovoy have also been secured. Dozens of civilians, who had survived under enemy occupation, were evacuated from the liberated villages. The AFU continues launching long-range US MLRS strikes on the region. Yesterday morning, the AFU attacked a feed factory in the village of #Kozyrevka, Bolshesoldatsky district, killing four employees and seriously wounding another. The Supreme Commander visited the command post of the Russian Grouping, setting the task of expanding the buffer zone along the border and fully defeating enemy forces in the #Kursk region.
🔹 In #Sumy Region, meanwhile, clashes continue along the #Novenkoye – #Basovka axis.
🔹 In #Liman Section, fighting is ongoing towards #Novoye and south of #Yampolovka, where the AFU is offering organised resistance and bringing in reserves.
🔹 In #Toretsk, the situation remains unchanged. The enemy continues infiltrating units into the urban area. While the AFU has no chance of altering the situation, eliminating the enemy groups that have managed to break through consumes time and resources.
🔹 In #Pokrovsk Direction, Russian forces are attacking in the areas of #Uspenovka, #Udachnoye, and #Kotlino. Heavy fighting continues in #Peschanoye and #Shevchenko, with no significant territorial gains for a long time. The enemy has reinforced this sector with reserves, including units trained in EU countries, and is suffering heavy losses in counterattacks. South of #Yasenevo, Russian forces are also attacking to straighten the front line.
🔹 On the #Vremyevka Ledge, Russian forces have raised the flag over the northern part of #Dneproenergiya, confirming the capture of the settlement.
🔹 On the #Zaporozhye Front, intense combat continues in the #Orekhov direction and on the approaches to #Shcherbaki. Russian forces are making progress, and positive developments from this axis are expected.
💥 In #Belgorod Region, the AFU Nazis continues their attacks. In the hamlet of #Tserkovny, Belgorod district, a drone struck a civilian car. Another vehicle was attacked by an FPV drone in the village of #Terebreno, Krasnoyaruzhsky district. A social facility was hit in #Tishanka, Volokonovsky district. In #Shvedunovka, Valuysky district, a drone detonated near a private house.
💥 In the #DPR, in #Nikolskoye, Volnovakha municipal district, a man born in 1975 was killed by the detonation of an explosive device. Near a reservoir in #Ilovaysk, a 17-year-old boy was injured due to the detonation of an explosive device.
💬Welcome to Military Chat;
🇬🇧Battle Maps
📱 Join GLOBAL DEPTH to boost your TG Feed
GLOBAL DEPTH from #HK
This channel aims to unite interested individuals from around the world in an attempt to connect the dots. Subscriber participation is always welcome here and in the channel's Chat Group.
⚡️🇷🇺🇺🇦⚡️ Two Majors #Summary for the Morning of 15 March 2025; 06:29 (GMT+3)⚡️
🛡More than 20 UAVs were downed by air defence and EW means over the #Voronezh region at night. The governor of the #Bryansk region also reported that an UAV attack had been repelled. Local media reported explosions (15-20) over #Volgograd, with one drone downed near 'Sarepta Station.' The likely target was the local oil refinery, with footage of a fire emerging. During the day, a drone crashed in the centre of #Dzhankoy (#Crimea), injuring 2 women. The UAV damaged a café, and shrapnel struck 2 private houses and a church. There were 3 wounded.
🎯 Russian Forces, in turn, targeted industrial zones and the port in #Odessa and its surroundings with Geranium drones. A fire broke out at an electrical substation following one of the strikes, and the regional administration reported that #Chernomorsk (#Ilyichevsk) was completely blacked out due to damage to the energy infrastructure. The enemy also reported strikes on #Chernigov, #Pavlograd, #Cherkassy, #Starokonstantinov, the Bogodukhovsky district of the #Kharkov region, as well as the #Vinnitsa and #Kiev regions.
🔹 In #Kursk Region, the destruction of remaining enemy forces attempting to retreat into the #Sumy region continues. Trump has stated that thousands of AFU militants are encircled. The final settlements left to be liberated are #Gogolevka, #Gornal, #Oleshnya, and #Guyevo. The enemy is striking liberated territories. AFU Nazis targeted the local history museum in #Sudzha, an architectural monument from the late 19th century. A museum employee, who had remained in the city during the occupation and had come to inspect the building, was killed. 2 other employees were wounded. Since 12 March, 209 residents have been evacuated from the liberated settlements. Amid the Russian Army’s advance and the Supreme Command’s objective of creating a buffer zone, mandatory evacuation has begun in 8 villages near the border in the #Yunakovka and #Miropolye communities of the #Sumy region. Russian forces have already pushed into enemy territory towards #Basovka and #Zhuravka.
Until demining operations are completed, the authorities in the region have imposed temporary entry restrictions in 122 settlements across 6 districts bordering #Ukraine.
🔹 In the North of #Kupyansk Direction, reports indicate clashes with AFU forces near #Figolevka on the right bank of the Oskol.
🔹 In #Pokrovsk Direction, fighting continues near #Udachnoye, #Kotlino, #Peschanoye, #Shevchenko, and #Tarasovka. The enemy claims that Russian units, freed up after the liberation of #Konstantinovka, have been redeployed to #Pokrovsk to increase pressure.
🔹 On the #Vremyevka Ledge, the 'Group of Troops East' continues advancing towards #Bogatyr west of the village. Fighting is ongoing in the areas of #Dneproenergiya and #Burlatskoye.
🔹 On the #Zaporozhye Front, reports indicate Russian success near #Shcherbaki and #MalyeShcherbaki.🗺👆Russian units continue to assault enemy positions in the forest plantations. From the southern side, airborne troops have entered #Shcherbaki, assaulting enemy fortifications and strongpoints. The enemy has pulled back its main forces, leaving observation posts in the village manned with machine gun and rifle crews, supported by artillery and kamikaze drones. #Shcherbaki is nearly cleared. Assault groups of the Russian Airborne Forces are advancing from the south towards #MalyeShcherbaki and from the east towards #Shcherbaki.
💥 In #Belgorod Region, the enemy continues heavy strikes.
#Valuyki, #Kukuyevka, #Murom, #Shebekino, #Tishanka in the Volokonovsky district, and #YasnyeZori in the Belgorod district are under attack.
💥 In #Gorlovka (#DPR), a Nazi drone strike injured a 1951-born woman and a 1981-born man. A 1970-born man was injured by enemy barrel artillery.
📱 Join GLOBAL DEPTH to boost your TG Feed
💬Welcome to Military Chat & Ukraine Observer
🇺🇦On Ukraine Observer you will find your daily independent Ukraine War Battle Update
⚡️
🇷🇺
🇺🇦⚔️ Ukraine Fronts on the Morning of 26 March⚡️
🔴#Sumy Direction:
🔴In #Sudzha Sector, to the west on Ukrainian lands, for a RFAF presence at #Vladimirovka evidence is still missing (1st blue arrow on map).
🟡 For #Veselovka, the battle continues (1st black arrow).
🟡 In #Zhuravka as well.
🟡#Basovka is at best 50% RFAF controlled.
🟡#Novenkoye, is Russian controlled (1st red arrow).
🟡 In #Kursk region, according to unconfirmed reports, the 'Sudza Gas Transmission Point' is under RFAF control and the battle for the nearby border checkpoint continues (4th black arrow).
🟡#Gogolevka remains under full AFU control (2nd blue arrow). Contrary reports are unproven.
🟡#Melovoy came under the control of Russian troops, which advanced further westwards towards #Oleshnya (2nd red arrow).
🟡#Oleshnya, #Guyevo and #Gornal remain under AFU control for now.
🔴In #KrasnayaYaruga Sector, the AFU 8th Special Forces Regiment and 'Aidar' Nationalists failed to take #Popovka (5th black arrow). Over the past day, the AFU razed the village to the ground with artillery and drones.
🟡 In #Demidovka, nearby to the southeast, Small AFU groups enter periodically, uncapable to take the village (6th black arrow).
🟡 At #Grafovka, lull.
🟡 West of #Prilesye, the AFU have been driven out from Russian territory.
🗺 All on Map 1
🔴 In #Kharkov Direction, positional battles continue In the areas of #Lipsy and #Volchansk. A large number of drones, artillery and aircraft are used.
🔴#Svatovo Front:
🔴 In #Kupyansk Sector, north of the city, Russian forces created a new bridgehead between #Kamenka and #Krasnoye1st. In the area of #Dvurechnaya, the battles continue, as well as on the #Zapadnoye - #Kalinovo line.
🔴 In #Borovaya, #Liman and #Seversk Sectors, without major changes.
🔴#ChasovYar Direction:
🔴In #ChasovYar Sector, heavy urban battles continue in 'Shevchenko Microdistrict' in the southern part of the city. To the south, fighting in the area of #Stupochki.
🔴In #Toretsk Sector, the RFAF continue attempts to take the city, increasing the pressure in its north.
🔴#Pokrovsk Direction:
🔴 On the right Flank, far to the east, Russian troops attack southwest of #Aleksandropol and try to straighten the front.
🔴 South of the City and on the left Flank, no changes.
🔴#Komar Direction:
🔴In #Konstantinopol Sector, the battle for the same named village continues.
🟡 Southeast of #Razliv, the RFAF advanced on a broad front, extending the zone of control in an area up to 4 km wide and up to 2.05 km deep, approaching the settlement located southwest of #Konstantinopol.
🔴 In #Komar Sector, Russian forces repulsed AFU counterattacks in the areas of the #Vesyoloye and #VolnoyePole settlements.
🔴#Zaporozhye Direction:
🔴In #Orekhov Section, the situation based on confirmed and evidenced data has improved for the RFAF:
🟡 In #Shcherbaki, the AFU lost full control.
🟡 In nearby #MalyeShcherbakito the west, the RFAF have advanced. The AFU still hold positions in its far northeast.
🟡 In #Stepovoye's, further west, there are heavy fights in the village.
🎬 Video 1
🗺 Map 2
🟡 In #Lobkovoye, the the RFAF advanced northwards. About 50% of the village came under Russian control.
🗺 Map 2
🟡 #Pyatikhatki, came under full RFAF control yesterday.
🗺 Map 2
🔴 In #Kherson Direction, no changes.
💥#OldRussia:
🔵 In #Belgorod Region, civil objects in #Politodelsky, #Kazinka, #Shebekino, #Tishanka and #Bessonovka came under AFU attack.
💥#RestUkraine:
🔵 The RFAF targeted AFU facilities and militants in #Zaporozhye, #Nikolayev and #Dnepropetrovsk, as well as in #Sumy, #Poltava and #Cherkassy regions.
🟡 In #KrivoyRog, more than 15 explosions occurred overnight.
🎬 Video 2
🎞 Vids Source 1; Source 2;
🗺 Maps @olegtsarov; @creamy_caprice
📋 Sources: CC; Tsarov; ⚡️2M;
🇺🇦Fiend;😼Kotenok
🕰As of 26 Mar 2025; 06:41 GMT+3;📃25 Mar
📱 Join GLOBAL DEPTH to boost your TG Feed
💬Join Military Chat for Comments & Discussions
🇺🇦On Ukraine Observer you will find your daily independent Ukraine War Battle Update
⚡️
🇷🇺
🇺🇦⚔️ Ukraine Fronts on the Morning of 28 March⚡️
🔴#Sumy Direction:
🔴In #Sudzha Sector, to the west on Ukrainian lands, the battle for #Vladimirovka reportedly continued {still unproven; 1st blue arrow on map}.
🟡 For #Veselovka as well, but confirmed {1st black arrow}.
🟡 In #Zhuravka as well. As for...
🟡#Basovka.
🟡#Novenkoye, is RFAF controlled {1st red arrow}.
🟡 In #Kursk region, the 'Sudza Gas Transmission Point' and the 'Border Checkpoint' came under RFAF control {2nd red arrow}.
🎬 Video
🟡#Gogolevka, reportedly has been taken by Russian troops {4th black arrow}.
🟡#Oleshnya remains AFU controlled.
🟡 In #Guyevo, according to unconfirmed reports, the RFAF control the northern part. Fierce fighting continues.
🟡#Gornal remains under save AFU control.
🔴In #KrasnayaYaruga Sector, the battle for #Popovka and #Demidovka continued, so far without tangible success for the AFU {5th/6th black arrow}.
🟡 At #Grafovka, lull.
🟡 At #Prilesye as well.
🗺 All on Map 1
🔴 In #Kharkov Direction, positional battles and aviation operations in the areas of #Liptsy, Volchansk and strikes at AFU rear supply routes.
🔴#Svatovo Front:
🔴 In #Kupyansk and #Borovaya Sector, ongoing battles without significant changes.
🔴In #Liman Sector, Russian troops have advanced towards #Katerinovka and #Novoye.
🔴In #Seversk Sector, fighting at #Belogorovka (#LPR) and #Verkhnekamenskoye is ongoing.
🔴#ChasovYar Direction:
🔴In #ChasovYar and #Toretsk Sectors, the fighting continued, without major changes.
🔴#Pokrovsk Direction:
🔴 On the right Flank, far to the east, battles are taking place in the area of #Panteleymonovka. Further west for #Tarasovka and the territory to its west.
🔴 South of the City, the situation remains dynamic.
🟡 In #Peschanoye, Russian troops advanced reportedly in the western and central village parts {according to the map the AFU lost control of its (black added) boundaries}.
🗺 Map 2
🟡 In #Kotlino, the AFU entered (confirmed), and reportedly seized nearly all of the settlement's boundaries.
🗺 Map 3
🔴 On the left Flank, the area of #Udachnoye is sunk in the fog of war.
🟡 In #Uspenovka, Russian troops are reportedly clearing the village and have advanced southwest of it into...
🟡#Novoaleksandrovka, the fighting for which has begun. Further south...
🟡 On #Preobrazhenka's approaches, the fighting continues, as well as towards #Troitskoye and #Bogdanovka.
🔴#Komar Direction:
🔴In #Konstantinopol Sector, the same named village is in the fog of war.
🟡 In #Razliv, to the southwest, the RFAF have reportedly entered the village.
🔴 In #Komar Sector, Russian assault groups broke reportedly through north of #Dneproenergiya and attack the eastern part of #Vesyoloye. The village is also under assault from the south.
🟡 In #Volnoye Pole, Russian forces lost their positions in the centre, but consolidated in the eastern village part.
🔴#Zaporozhye Direction:
🔴In #Orekhov Section, fighting continues in the#MalayaTokmachka - #Rabotino area. The main battles are taking place further west:
🟡 In #Shcherbaki, the RFAF have advanced into the village's centre. The AFU counterattacks.
🟡#MalyeShcherbakito the west, is still not completely RFAF controlled.
🟡 In #Stepovoye, further west, fighting continues with varying success.
🟡 In #Lobkovoye as well.
🟡#Pyatikhatki is RFAF controlled.
🔴 In #Kherson Direction, fights in the island zone.
💥#OldRussia:
🔵 In #Belgorod Region, the villages of #Belyanka, #Nechayevka, #Tishanka, #Shakhovka, #Smorodino and #Kukuyevka came under AFU fire.
💥#RestUkraine:
🔵 The RFAF struck objects in #Kiev, #Odessa, #Dnepropetrovsk, #Kharkov, #Khmelnitsky, #Nikolayev, #Cherkassy, and Poltava regions.
🎞 Video Source
🗺 Maps @olegtsarov; @petrenko_iHS
📋 Sources: CC; Tsarov; ⚡️2M;
🇺🇦Fiend;😼Kotenok
🕰As of 28 Mar 2025; 06:37 GMT+3;📃27 Mar
📱 Join GLOBAL DEPTH to boost your TG Feed
💬Join Military Chat for Comments & Discussions
🇺🇦On Ukraine Observer you will find your daily independent Ukraine War Battle Update