В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
⚡️
🇷🇺
🇺🇦⚔️ Ukraine Fronts on the Morning of 17 March⚡️
🔴#Sumy Direction:
🔴In #Sudzha Sector, west of the city in #Ukraine, the RFAF is fighting for #Zhuravka and in the direction of #Belovody to the south of it. To the east, battles for #Basovka are ongoing.
🟡 In #Russia, to the east, there are fierce battles for #Gogolevka.
🟡#Oleshnya remains under AFU control. For #Melovoy to the east of it, the situation is unclear.
🟡 For #Guyevo, battles continue.
🟡#Gornalin the far south of #Kursk region, remains under AFU control for now.
🗺 Map 1
🔴#Svatovo Front:
🔴 In #Kupyansk Sector, on the right bank of the Oskol River, north of #Kupyansk, the RFAF continue to advance.
🗺 Map 2
🔴 In #Borovaya Sector, fights for #Boguslavka's northern settlement outskirts continue.
🔴In #Liman Sector, fighting is taking place in the direction of #Zagryzovo - #Boguslavka.
🟡#Novolyubovka has been occupied by Russian forces.
🗺 Map 2
🔴#ChasovYar Direction:
🔴In #Toretsk Sector, fighting in the city continues.
🔴#Pokrovsk Direction:
🔴 On the right Flank, the battles for #Lysovka, where the RFAF took again control of its southwestern part, and #Novoukrainka continue.
🟡 In #Shevchenko, the AFU have consolidated in the northern part of the village. Periodically they try to enter the southern part, where they are defeated.
🎞 Video
🟡 In #Peschanoye, the AFU is trying to gain a foothold again. Most of the village is under Russian control.
🟡 In #Zverevo, Russian assault groups are attacking in the southeastern parts (north of #Peschanoye) and in the northwestern part.
🟡 In #Kotlino, the AFU counterattacks for the northwestern settlement outskirts.
🗺 Map 3
🔴 On the left Flank, the RFAF took the initiative and try to restore the situation in #Udachnoye. The eastern part of the settlement and most of industrial zone came under Russian control.
🗺 Map 3
🔴#Zaporozhye Direction:
🔴In the #Orekhov Section, Russian troops continue to attack with infantry units in the area of the conquered #Pyatikhatki settlement. Battles for #Shcherbaki and #MalyeShcherbaki to the west of it are ongoing. The AFU is counterattacking, also at #Stepovoye.
🗺 Maps @olegtsarov
📋Sources: ⚡️2M;
🇺🇦Fiend; 😼Kotenok
🕰17 Mar 2025; 06:34 GMT+3; #sum
📱 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 19 March⚡️
🔴#Sumy Direction:
🔴In #Sudzha Sector, to the west in #Ukraine, fights in and around #Zhuravka. To the southeast...
🟡 In #Basovka, the RFAF have advanced and the battle has shifted to the southern settlement part.
🟡 In #Kursk region, the battles for the villages of #Gogolevka and #Guyevo continue.
🟡#Oleshnya and #Gornal remain under AFU control.
🗺 Map 1; added arrows show the mentioned locations, black contested
🔴 In #KrasnayaYaruga Sector, the AFU crossed the border in the area of the #Demidovka, #Grafovka and #Prilesye villages south of #Sudhza in #Belgorod region. Several attack waves have been stopped by destroying armoured vehicles. The AFU remnants tried to get a foothold. Fights on Russian territory, especially towards #Demidovka with tank support continued. According to the latest unconfirmed report, the invaders have withdrawn to their initial positions in #Sumy region.
🎬 Video 1
🗺 Map 2
🔴#Kharkov Direction:
🔴In #Liptsy Section, the AFU counterattacked unsuccessfully in the settlement area of #Glubokoye.
🔴 In #Volchansk Section, the battle for the city continues.
🔴#Svatovo Front:
🔴 In #Kupyansk Sector, to the north, the RFAF are advancing from #Topoli southwestwards towards #Kamenka, the eastern approaches of which are also attacked. Furthermore Russian troops advance from the south on the village.
🟡 Near #Krasnoye1st(Pervoye), to the southwest, Russin units are advancing on the settlement.
🟡#Figolevka, located further southwest, has been recaptured by the AFU.
🟡 North of #Kupyansk, Russian units are expanding the bridgehead northeast of #Kondrashovka.
🟡 Northeast of #Kupyansk, the AFU counterattacks in the area of #Petropavlovka.
🔴 In #Borovaya Sector, fierce fighting in the northern outskirts of #Boguslavka continues.
🔴In #Liman Sector, Russian troops have advanced to #BalkaZhuravka's northern settlement outskirts and continue to attack in the westerly direction.
🟡 North of #Torskoye, positional battles are taking place.
🔴In #Seversk Sector, fights in the area of #Bologorofka (#LPR) continue. The AFU still hold positions on the Chalk Quarry (White Mountain) south of the village.
🟡 In #Verkhnekamenskoye, fights for the centre.
🔴#ChasovYar Direction:
🔴In #ChasovYar Sector, fierce battles continue. The AFU counterattacks.
🔴In #Toretsk Sector, the situation is unchanged.
🔴#Pokrovsk Direction:
🔴 South of the City, heavy battles and counterattacks continue. The situation is dynamic.
🟡#Shevchenko has been recaptured by Russian forces. The AFU counterattacks.
🟡 In #Peschanoye, the same situation as for #Shevchenko.
🟡 In #Kotlino, the northwestern outskirts and the cemetery area are embattled.
🔴 On the left Flank, the battle for #Udachnoye continues.
🔴#Komar Direction:
🔴In #Konstantinopol Sector, west of #Andreyevka, the AFU have pushed back Russian assault groups, which attacked towards #Alekseyevka.
🟡 In #Konstantinopol, the RFAF lost control over the village. The AFU have advanced into its centre.
🎬 Video 2
🟡 South of #Konstantinopol, the RFAF expanded their control zone by more than 1 km. The battle for the village continues.
🟡 From #Razdolnoye, Russian units advanced northwards towards #Razliv and #Bogatyr.
🔴 In #Komar Sector, northwest of #VelikayaNovosyolka, the RFAF are building on their success at #Burlatskoye.
🔴#Zaporozhye Direction:
🔴In the #Orekhov Section, we have to clarify that according to objective evidence data, #Shcherbaki, #MalyeShcherbaki and #Stepovoye are still contested.
🔴 In #Kherson Direction, no changes.
💥#OldRussia:
🔵 In #Krasnodar Territory, the AFU struck the 'Kavkazskaya Oil Transshipment Point.' This, after the Trump - Putin call.
🎞 Video 1 Source; 🎞 Video 2 Source
🗺 Maps @olegtsarov
📋 Sources: CC; Tsarov; ⚡️2M;
🇺🇦Fiend; 😼Kotenok
🕰19 Mar 2025; 06:43 GMT+3; #smo
📱 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 20 March⚡️
🔴#Sumy Direction:
🔴In #Sudzha Sector, in the west, fighting continues in and near #Zhuravka, as well as southeast of it in #Basovka on Ukrainian territory.
🟡 In #Kursk region, fierce battles in the areas of the #Gogolevka and #Guyevo villages continue.
📌 Referring to Previous Reports, doubts have arisen as to whether fights are already taking place in the villages. There is still no objective control footage. We have corrected our arrows on map accordingly, which show the control and mentioned locations.
🟡#Oleshnya and #Gornal remain safe under AFU control.
🔴 In #KrasnayaYaruga Sector, south of #Sudhza in Russian #Belgorod region, further massive AFU assaults especially on #Demidovka, as well as in the areas of #Grafovka and #Prilesye have been foiled. The search for the remnants is ongoing.
🗺 All on Map 1
✈️An AFU F16 was downed.
📌 The AFU Command is reportedly reinforcing all areas and intends to continue also the attacks on #Belgorod region.
🔴 In #Kharkov Direction, without significant changes.
🔴#Svatovo Front:
🔴 In #Kupyansk Sector, fierce fighting along the LoC continues, but without changes.
🔴 In #Borovaya Sector, the battle for #Boguslavka continues.
🔴In #Liman Sector, the RFAF advanced west of the #BalkaZhuravka settlement.
🔴In #Seversk Sector, fights in the area of #Bologorovka (#LPR) and in #Verkhnekamenskoye continue.
🔴#ChasovYar Direction:
🔴In #ChasovYar Sector, the northwestern part of the city is almost completely under Russian control. The battle for the centre southwest of the 'Refractory Plant' continues. Russian troops attacked from the east with armoured vehicles. The result of the battle is disputed.
🗺 Map 2
🎬 Video 1
🔴In #Toretsk Sector, northeast of the city, RFAF units attacked northeast of the #Druzhba settlement towards positions taken by Russian assaults beyond the canal near #Ozeryanovka.
🟡 In #Toretsk itself, the RFAF expanded their zone of control.
🔴#Pokrovsk Direction:
🔴 On the right Flank and south of the city, without significant changes.
🔴 On the left Flank, the battle for #Udachnoye continues as usual.
🟡 In #Uspenovka, the fierce battle continues and towards #Novoalexandrovka southwest of it.
🟡 In #Preobrazhenka, fighting for the eastern settlement part continues. To the south, the Russian troops are attacking towards #Troitskoye and #Bogdanovka.
🔴#Komar Direction:
🔴In #Konstantinopol Sector, the RFAF advanced west of #Slavyanka and north of #Andreyevka, but were driven out of a stronghold northwest of the latter.
🟡 In #Konstantinopol, the battle continues.
🔴 In #Komar Sector, the yesterday reported Russian advance south of #Privolnoye has been confirmed, the fights for the village itself continue.
🔴#Zaporozhye Direction:
🔴In the #Orekhov Section, north of #Rabotino the RFAF attack towards #Novodanilovka and further west in the direction of #Novoandreyevka.
🟡 For #Shcherbaki and #MalyeShcherbaki, the battle continues.
🟡#Stepovoye came, according to unconfirmed reports, under Russian control, as well as heights north of it.
🟡 For #Lobkovoye, the battle has begun with fights in the village (unconfirmed), alternate on its approaches.
🔴 In #Kherson Direction, without significant changes.
💥#OldRussia:
🔵In #Voronezh Region, ca. 40 AFU UAVs were downed overnight. In the #Saratov region, Zelensky tried to raid the Oil Refinery in #Engels, as a result of which the 'City Clinical Hospital No. 1' has been damaged. In the #Rostov region, another UAV attack was repelled. In #Gorlovka (#DPR), 11 civilians were wounded yesterday by Zelensky's morning shelling of the city centre.
💥#RestUkraine:
🔵 In #Kirovograd Region, in turn, after a massive Geranium UAV attack, more than 30 explosions occurred in the town of #Kropyvnytsky.
🎬 Video 2
🎞 Vids Source 1; Source 2;
🗺 Maps @olegtsarov; @creamy_caprice
📋 Sources: CC; Tsarov; ⚡️2M;
🇺🇦Fiend; 😼Kotenok
🕰20 Mar 2025; 06:44 GMT+3; #smo
📱 Join GLOBAL DEPTH to boost your TG Feed
💬Welcome to Military Chat & Ukraine Observer
⚡️
🇷🇺
🇺🇦⚔️ Ukraine Fronts on the Morning of 18 March⚡️
🔴#Sumy Direction:
🔴In #Sudzha Sector, west of the city on Ukrainian territory, battles are being fought for the villages of #Zhuravka and to the southeast for #Basovka.
🟡 In #Kursk region, heavy battles are taking place for the villages of #Gogolevka, most of which is under Russian control, and #Guyevo.
🟡#Oleshnya and #Gornalin the far south are the last villages in the #Kursk region still under AFU control.
🗺 Map 1
🔴#Kharkov Direction:
🔴In #Liptsy Section, there are positional battles, as well as...
🔴 In #Volchansk Section, especially in and in the area of the city.
🔴#Svatovo Front:
🔴 In #Kupyansk Sector, north of the city, the expansion of the Russian bridgeheads on the right bank of the Oskol River continues.
🟡 In the area of #Petropavlovka, Russian troops have advanced almost 1 km towards #Kupyansk.
🔴 In #Borovaya Sector, the battle for #Boguslavka continues with fierce fighting in its northern outskirts.
🔴In #Liman Sector, Russian troops attack in the areas of #Yampolovka and #Novolyubovka.
🔴In #Seversk Sector, the RFAF attack in the area of #Verkhnekamenskoye. Otherwise positional battles.
🔴#ChasovYar Direction:
🔴In #ChasovYar Sector, Russian troops continue attacks in the settlements area of #OrekhovoVasilyevka and #Grigorovka.
🟡 In the City, Russian forces are advancing in several microdistricts.
🟡 Towards #Stupochki, south of the city, the Russians are attacking as well.
🔴In #Toretsk Sector, fights for #Krymskoye, in the city itself and even in the southern 'Zabalka Microdistrict' continue.
🗺 Map 2
🔴#Pokrovsk Direction:
🔴 On the right Flank, far east the front has been reactivated. The RFAF advanced from #Novobakhmutovka in the direction of #Aleksandropol.
🟡 Towards #Aleksandropol2nd and #Tarasovka, Russian assault groups are attacking.
🗺 All on Map 2
🔴 South of the City, battles for #Lysovka, #Shevchenko, #Peschanoye, and #Kotlino continue.
🔴 On the left Flank, battles for #Udachnoye continue.
🟡 In #Uspenovka, the RFAF could regain 50% control.
🟡 Southwest of #Nadezhdinka (#Nadeyevka), Russian units are attacking towards #Kotlyarovka.
🟡#Preobrazhenka has been entered by Russian forces. There are fights in the eastern settlement part.
🔴#Komar Direction:
🔴In #Kontantinopol Sector, Russian assault groups are attacking from the area of #Andreyevka towards #Alekseyevka.
🔴 In #Komar Sector, the RFAF advanced south of the #Vesyoloye village along the forest belt. Further southwest, the RFAF expanded the control zone on the #Privolnoye - #Novosyolka line up to 2 km, taking up new positions south of #Privolnoye.
🔴#Zaporozhye Direction:
🔴In the #Orekhov Section, the RFAF continue the offensive north of #Nesteryanka and southeast of #Shcherbaki on a broad front towards #Novoandreyevka, in the vicinity of which the town of #Orekhov itself is located to the northeast.
🟡#Shcherbaki, #MalyeShcherbaki and #Stepovoye came under Russian control. Clearing is taking place. This according to unconfirmed reports. Further evidence or confirmation from the opposing side are currently missing.
🟡 Nort of #Pyatikhatki, there is fighting on the approaches to #Lobkovoye.
🗺 Map 3
💥 In #Kherson Direction, mutual strikes. The RFAF targets EW systems, vehicles, and firing positions while the AFU concentrate on civilian objects.
💥#OldRussia:
🔵 In #Belgorod Region, the AFU attacked civilian targets in several villages overnight, causing civilian casualties.
🎯 The RFAF struck targets in #Dnepropetrovsk, #Kiev, #Odessa, #Cherkassy, #Poltava, and #Nikolayev regions.
🗺 Maps @olegtsarov; @voenkorKotenok
📋 Sources: CC; Tsarov; ⚡️2M;
🇺🇦Fiend; 😼Kotenok
🕰18 Mar 2025; 06:40 GMT+3; #smo
📱 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