Re: Qt 6.0 development and qelectrotech

MXE + cmake + shared libs.

Paths used for compilation and installation of QET
--------------------------------------------------
COMPIL_PREFIX              ./
INSTALL_PREFIX             ./
QET_BINARY_PATH            ./
QET_COMMON_COLLECTION_PATH ./elements/
QET_COMMON_TBT_PATH        ./titleblocks/
QET_LANG_PATH              ./l10n/
CMake Error at cmake/define_definitions.cmake:42 (if):
  if given arguments:

    "STRGREATER" ""

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:79 (include)


-- Configuring incomplete, errors occurred!

So hack CMakeLists.txt & define_definitions.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ff30a7b6..1d8249634 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,26 +133,4 @@ target_include_directories(
   )
 
install(TARGETS ${PROJECT_NAME})
-install(DIRECTORY ico/breeze-icons/16x16 DESTINATION ${QET_ICONS_PATH})
-install(DIRECTORY ico/breeze-icons/22x22 DESTINATION ${QET_ICONS_PATH})
-install(DIRECTORY ico/breeze-icons/32x32 DESTINATION ${QET_ICONS_PATH})
-install(DIRECTORY ico/breeze-icons/48x48 DESTINATION ${QET_ICONS_PATH})
-install(DIRECTORY ico/breeze-icons/64x64 DESTINATION ${QET_ICONS_PATH})
-install(DIRECTORY ico/breeze-icons/128x128 DESTINATION ${QET_ICONS_PATH})
-install(DIRECTORY ico/breeze-icons/256x256 DESTINATION ${QET_ICONS_PATH})
-install(DIRECTORY elements DESTINATION share/qelectrotech)
-install(DIRECTORY examples DESTINATION share/qelectrotech)
-install(DIRECTORY titleblocks DESTINATION share/qelectrotech)
-install(FILES LICENSE ELEMENTS.LICENSE CREDIT README ChangeLog DESTINATION share/doc/qelectrotech)
-install(FILES misc/qelectrotech.desktop DESTINATION share/applications)
-install(FILES misc/x-qet-element.xml
-              misc/x-qet-project.xml
-              misc/x-qet-titleblock.xml
-              DESTINATION share/mime/application)
-install(FILES misc/x-qet-element.desktop
-              misc/x-qet-project.desktop
-              misc/x-qet-titleblock.desktop
-              DESTINATION share/mimelnk/application)
-install(FILES misc/qelectrotech.xml DESTINATION share/mime/packages)
-install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH})
-install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH})
+
diff --git a/cmake/define_definitions.cmake b/cmake/define_definitions.cmake
index 659838dde..ce991851f 100644
--- a/cmake/define_definitions.cmake
+++ b/cmake/define_definitions.cmake
@@ -39,10 +39,7 @@ if(${QET_LANG_PATH} STRGREATER "")
   message("QET_LANG_PATH              " ${INSTALL_PREFIX}${QET_LANG_PATH})
   add_definitions(-DQET_LANG_PATH=${INSTALL_PREFIX}${QET_LANG_PATH})
endif()
-if(${QET_EXAMPLES_PATH} STRGREATER "")
-  message("QET_EXAMPLES_PATH          " ${INSTALL_PREFIX}${QET_EXAMPLES_PATH})
-  add_definitions(-DQET_EXAMPLES_PATH=${INSTALL_PREFIX}${QET_EXAMPLES_PATH})
-endif()
+
 
message("QET_LICENSE_PATH           " ${QET_LICENSE_PATH})
message("QET_MIME_XML_PATH          " ${QET_MIME_XML_PATH})

https://download.qelectrotech.org/qet/s … st/bin.zip
Replace this bin in your program to test.

laurent@debian:~/test/bin$ tree
.
├── iconengines
│   └── qsvgicon.dll
├── imageformats
│   ├── qgif.dll
│   ├── qicns.dll
│   ├── qico.dll
│   ├── qjp2.dll
│   ├── qjpeg.dll
│   ├── qmng.dll
│   ├── qsvg.dll
│   ├── qtga.dll
│   ├── qtiff.dll
│   ├── qwbmp.dll
│   └── qwebp.dll
├── kwidgetsaddons5widgets.dll
├── libbs2b-0.dll
├── libbz2.dll
├── libcrypto-1_1-x64.dll
├── libffi-6.dll
├── libfontconfig-1.dll
├── libfreetype-6.dll
├── libgcc_s_seh-1.dll
├── libgcrypt-20.dll
├── libglib-2.0-0.dll
├── libgmp-10.dll
├── libgmpxx-4.dll
├── libgobject-2.0-0.dll
├── libgthread-2.0-0.dll
├── libharfbuzz-0.dll
├── libharfbuzz-icu-0.dll
├── libiconv-2.dll
├── libidn2-0.dll
├── libIlmThread-2_2-12.dll
├── libintl-8.dll
├── libjpeg-9.dll
├── libKF5CoreAddons.dll
├── libKF5WidgetsAddons.dll
├── libmenu5.dll
├── libogg-0.dll
├── libopenjp2.dll
├── libpcre16-0.dll
├── libpcre-1.dll
├── libpcre2-16-0.dll
├── libpcre2-8-0.dll
├── libpng16-16.dll
├── libsqlite3-0.dll
├── libssl-1_1-x64.dll
├── libstdc++-6.dll
├── libtasn1-6.dll
├── libtiff-5.dll
├── libtiffxx-5.dll
├── libwinpthread-1.dll
├── libxml2-2.dll
├── libzstd.dll
├── platforms
│   ├── qdirect2d.dll
│   ├── qminimal.dll
│   ├── qoffscreen.dll
│   └── qwindows.dll
├── platformthemes
│   └── qxdgdesktopportal.dll
├── printsupport
│   └── windowsprintersupport.dll
├── qelectrotech.exe
├── Qt5Concurrent.dll
├── Qt5Core.dll
├── Qt5Gui.dll
├── Qt5Help.dll
├── Qt5Network.dll
├── Qt5PrintSupport.dll
├── Qt5Sql.dll
├── Qt5Svg.dll
├── Qt5Widgets.dll
├── Qt5WinExtras.dll
├── Qt5Xml.dll
├── sqldrivers
│   └── qsqlite.dll
├── styles
│   └── qwindowsvistastyle.dll
└── zlib1.dll

7 directories, 73 files

@Simon: I saw a strange thing with cmake build in Windows, and linux, loading project is very slow like don't use futur?

06:05:31.944 Info: Start-up 
06:05:32.249 Info: debugging enabled: false 
06:05:32.253 Info: Qt library version: 5.15.2 
06:05:32.255 Info: Qt library location default prefix: "C:/Program Files/QElectroTech/bin" 
06:05:32.259 Info: Qt library location documentation: "C:/Program Files/QElectroTech/bin/doc" 
06:05:32.263 Info: Qt library location headers: "C:/Program Files/QElectroTech/bin/include" 
06:05:32.267 Info: Qt library location libraries: "C:/Program Files/QElectroTech/bin/lib" 
06:05:32.271 Info: Qt library location executables: "C:/Program Files/QElectroTech/bin/bin" 
06:05:32.275 Info: Qt library location Qt binaries: "C:/Program Files/QElectroTech/bin/bin" 
06:05:32.279 Info: Qt library location Qt plugins: "C:/Program Files/QElectroTech/bin/plugins" 
06:05:32.283 Info: Qt library location installed QML extensions: "C:/Program Files/QElectroTech/bin/imports" 
06:05:32.288 Info: Qt library location installed QML extensions: "C:/Program Files/QElectroTech/bin/qml" 
06:05:32.293 Info: Qt library location dependent Qt data: "C:/Program Files/QElectroTech/bin" 
06:05:32.297 Info: Qt library location independent Qt data: "C:/Program Files/QElectroTech/bin" 
06:05:32.302 Info: Qt library location translation: "C:/Program Files/QElectroTech/bin/translations" 
06:05:32.306 Info: Qt library location examples: "C:/Program Files/QElectroTech/bin/examples" 
06:05:32.311 Info: Qt library location Qt testcases: "C:/Program Files/QElectroTech/bin/tests" 
06:05:32.315 Info: "GitRevision a4adcf4865a1b8ddf00a0e1ab40ac7ea5406abc1" 
06:05:32.318 Info: "QElectroTech V 0.90-DEV" 
06:05:32.320 Info: "Compilation : GCC 9.3.0" 
06:05:32.322 Info: "Built with Qt 5.15.2 - Date : Mar 20 2021 : 16:26:06" 
06:05:32.327 Info: "Run with Qt 5.15.2 using 8 thread(s)" 
06:05:32.330 Info: "CPU : NAME                                      \r\r\nINTEL(R) CORE(TM) I7-8550U CPU @ 1.80GHZ  \r\r\n\r\r\n" 
06:05:32.335 Info: "RAM Total : 16199 MB" 
06:05:32.337 Info: "RAM Available : 12438 MB" 
06:05:32.339 Info: "GPU : VideoProcessor                \r\r\nIntel(R) UHD Graphics Family  \r\r\n\r\r\n" 
06:05:32.345 Info: "GPU RAM : RAM Total : AdapterRAM  \r\r\n1073741824  \r\r\n\r\r\n B" 
06:05:32.349 Info: "OS : winnt  - x86_64 - Version : Windows 10 Version 2009 - Kernel : 10.0.19042" 
06:05:32.354 Info: *** Qt screens *** 
06:05:32.356 Info: "( 1 : 3840 x 2160 )" 
06:05:32.621 Info: Elements collection reload 
06:05:37.897 Info: Elements collection finished to be loaded

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

77 (edited by De-Backer 2021-03-21 08:57:34)

Re: Qt 6.0 development and qelectrotech

scorpio810 wrote:

@Simon: I saw a strange thing with cmake build in Windows, and linux, loading project is very slow like don't use futur?

So that something is missing in Cmake file, that is there in Qmake? Or so.

Qmake creates makefiles for the compiler.

for Cmake
you can generate makefiles explicitly using the -G option.

Edit :
Qmake => makefiles
Cmake => Ninja
could this be it?

Re: Qt 6.0 development and qelectrotech

mkdir build && cd build
export PATH=/home/laurent/digikam2/project/bundles/mxe/build.win64/usr/bin:$PATH
/home/laurent/digikam2/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.shared-cmake .. -G Ninja
time ninja -j48

cmake + ninja
time ninja -j48 (shared)
real    0m10,666s


cmake + make
time make -j48  (shared)
real    0m15,390s

qmake + make (static)
time make -j48
real    0m39,842s


Static exe =34Mio
shared libs +exe = 103Mio


I haven't seen any big improvements with shared libs, and you?

Ninja build
https://download.qelectrotech.org/qet/s … est/ninja/

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

https://fossies.org/linux/texstudio/.gi … age_win.sh

laurent@debian:~/Qet-svn/git/cmake/build$ /home/laurent/digikam2/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.shared-peldd qelectrotech.exe -a -w d3d11.dll -w dxgi.dll|grep dll|xargs cp -t .
laurent@debian:~/Qet-svn/git/cmake/build$ tree | grep dll
│   ├── kwidgetsaddons5widgets.dll
│   ├── libgmock.dll
│   ├── libgmock_main.dll
│   ├── libgtest.dll
│   ├── libgtest_main.dll
│   ├── libKF5CoreAddons.dll
│   └── libKF5WidgetsAddons.dll
│   │   │       │   └── pugixml_dll.rc.res
│   │   ├── libpugixml.dll
│   │   ├── libpugixml.dll.a
│   │   │   ├── pugixml_dll.rc
│   ├── libgmock.dll.a
│   ├── libgmock_main.dll.a
│   ├── libgtest.dll.a
│   ├── libgtest_main.dll.a
│   ├── libKF5CoreAddons.dll.a
│   └── libKF5WidgetsAddons.dll.a
├── libbz2.dll
├── libcrypto-1_1-x64.dll
├── libfreetype-6.dll
├── libgcc_s_seh-1.dll
├── libglib-2.0-0.dll
├── libharfbuzz-0.dll
├── libiconv-2.dll
├── libintl-8.dll
├── libKF5CoreAddons.dll
├── libKF5WidgetsAddons.dll
├── libpcre-1.dll
├── libpcre2-16-0.dll
├── libpng16-16.dll
├── libssl-1_1-x64.dll
├── libstdc++-6.dll
├── libwinpthread-1.dll
├── libzstd.dll
├── Qt5Concurrent.dll
├── Qt5Core.dll
├── Qt5Gui.dll
├── Qt5Network.dll
├── Qt5PrintSupport.dll
├── Qt5Sql.dll
├── Qt5Svg.dll
├── Qt5Widgets.dll
├── Qt5Xml.dll
└── zlib1.dll

great! but forgot libsqlite3-0.dll

Maybe add
find_package(SQLite3 REQUIRED)


laurent@debian:~/Qet-svn/git/cmake/build$ /home/laurent/digikam2/project/bundles/mxe/build.win64/usr/bin/x86_64-w64-mingw32.shared-objdump -p  qelectrotech.exe | grep "DLL Name" | awk '{print $3}'
ADVAPI32.dll
KERNEL32.dll
msvcrt.dll
libgcc_s_seh-1.dll
libstdc++-6.dll
Qt5Concurrent.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Network.dll
Qt5PrintSupport.dll
Qt5Sql.dll
Qt5Svg.dll
Qt5Widgets.dll
Qt5Xml.dll
libKF5CoreAddons.dll
libKF5WidgetsAddons.dll

 laurent@debian:~/Qet-svn/git/cmake/build$ strings qelectrotech.exe | grep -i '\.dll$'
ADVAPI32.dll
KERNEL32.dll
msvcrt.dll
libgcc_s_seh-1.dll
libstdc++-6.dll
Qt5Concurrent.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Network.dll
Qt5PrintSupport.dll
Qt5Sql.dll
Qt5Svg.dll
Qt5Widgets.dll
Qt5Xml.dll
libKF5CoreAddons.dll
libKF5WidgetsAddons.dll

Try ninja install

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

Qt 6 Reaches Feature Parity with Qt 5 - the Qt 6.2 Alpha Released

https://www.qt.io/blog/qt-6.2-alpha-released

the porting guide https://doc.qt.io/qt-6/portingguide.html

Changes to Qt Modules https://doc.qt.io/qt-6/modulechanges.html
Concurrent,GUI,Core,Print Support ,SQL,SVG,Test,Widgets,XML,....

Re: Qt 6.0 development and qelectrotech

https://github.com/mxe/mxe/issues/2594

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

Hi Laurent, i had a forced format on my dev PC.
Time to start over with qet and QT6.2.

How long can qet stay on 5.xx?
And when will qet0.9 be released?
In other words, what is the deadline for qet 0.9 on QT6.2.

Re: Qt 6.0 development and qelectrotech

Hi Simon,

for now, I saw no support for Qt6.x on MXE  cross-compile for Windows,
https://github.com/mxe/mxe/issues/2594

No Debian maintainers for Qt 6.x and no volunteers to package it yet.
https://lists.qt-project.org/pipermail/ … 40110.html
https://www.phoronix.com/scan.php?page= … aintainers

About KF5 to KF6 only KCoreAddons seem compatible for now
https://www.volkerkrause.eu/2021/12/11/ … t-qt6.html

Nothing is ready yet.

I think 0.9 wil be released when Joshua was finish new terminal block, but the road is long.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

Hi Laurent,

Thanks for the update, it's a shame that KF6 takes so long.
I would have loved to see it run on QT6.
ok QT5 then, let's see if I get it working.
oh yes did you get my email? (change text size elements)

Re: Qt 6.0 development and qelectrotech

Hi Simon,

Yes I read it, but didn't have time to look.
I had to reply to other more important emails.
I resumed my work following a sick leave of 2 months because of a big burn out and other health problem.
When I leave work I am exhausted and not always have the time or strength to address these issues.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

Sorry to hear, take care.

Re: Qt 6.0 development and qelectrotech

https://www.volkerkrause.eu/2022/01/15/ … ation.html

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

Tried on BigSur with Qt 6.3.2
https://download.qelectrotech.org/qet/s … t6.2.3.txt

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

89 (edited by De-Backer 2022-05-15 21:29:38)

Re: Qt 6.0 development and qelectrotech

https://git.tuxfamily.org/qet/qet.git/t … cell.h#n30
https://doc.qt.io/qt-6/qobject.html#Q_INTERFACES

plugin missing on 6.3?

but is it a plugin, see.

https://forum.qt.io/topic/79338/undefin … aphicsitem

Re: Qt 6.0 development and qelectrotech

https://spyro-soft.com/developers/qt5-t … ep-by-step
https://www.qt.io/blog/references-and-h … qt5-to-qt6

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

https://www.basyskom.de/translating-qt-applications/

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

92 (edited by elevatormind 2025-02-19 21:25:20)

Re: Qt 6.0 development and qelectrotech

hello, I just uploaded my qt6-cmake branch which I have succesfully compiled QET with QT 6.8.

github.com/elevatormind/qelectrotech-source-mirror/tree/qt6-cmake

My steps to succesfully compile QET:

Install Qt 6.8.0 (I installed it with the online installer), assuming Qt 6.8.0 installed to "~/Qt/6.8.0/"

Install ECM 6.8.0 manually:

git clone [url]https://github.com/KDE/extra-cmake-modules.git[/url] ecm-src
git checkout tags/v6.8.0
mkdir ecm-build && cd ecm-build
~/Qt/6.8.0/gcc_64/bin/qt-cmake -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=<Release or Debug> -G Ninja ../ecm-src
cmake --build . -j<n>
sudo cmake --install .

Compile QET (from a clean build-dir):

~/Qt/6.8.0/gcc_64/bin/qt-cmake -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=<Release or Debug> -DPACKAGE_TESTS=OFF -DBUILD_KF6=ON -G Ninja ../qet-src
cmake --build . -j<n>
sudo cmake --install .

Note, this will download and compile KCoreAddons and KWidgetAddons from github with cmake by default so no need to have them installed. This is controlled by the BUILD_KF6 (ON by default) and KF6_GIT_TAG (6.8.0 by default) cmake options.
I haven't got ExtraCmakeModules to work with the download and compile with cmake, but I assume it's only used for compiling and not needed at runtime so shouldn't be an issue.

I can't remember exactly why but there were some problems compiling KF6 addons lower than 6.8.0.

There are a lot of compile warning and error fixes, these maybe should be reviewed as I can't guarantee any bugs or side effects, there are probably some other fixes in there also that might not be related to Qt6. I remember putting all the .qm-files in a Qt-resource for example.

I have so far discovered two issues with QET/QT6.
1. Symbol library panel, the texts don't show until you hover over them with the mouse.
2. Nomenclature tables are growing in width, when you reload them the width increases.

Re: Qt 6.0 development and qelectrotech

WoW, thanks for your work, it compiled well on my Debian Sid with Qt 6.7.2, Qt 6.8.2 is still in the experimental branch. I 'm think for a few stil days.  https://incoming.debian.org/debian-buildd/pool/main/q/
And I don't want to break my plasma6.

I didn't need to compile KCoreAddons and KWidgetAddons.

sudo apt install qt6-tools-dev qt6-svg-dev libkf6coreaddons-dev libkf6widgetsaddons-dev

Edit:
I've noticed that there are refresh problems in the tree of the collection of elements with the names of the symbols.
Sweeping the mouse cursor makes them appear... Like you say.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

Nice, just happy to help. Like I said, did too much work on this to just let it sit on my computer nomicons/smile

I attached a screenshot of the table issue, you can see how wide it is. And it grows in width each time you refresh the table.

I've only gotten it to compile with the Qt6 Online installer, i'm on Ubuntu 22.0. Latest Qt6 I see as a package now is 6.4.2, and I think it was 6.3 something when I tried to compile and started to make it work with qt6. So it's definitely possible it works with earlier versions than 6.8, 6.7 obviously works nomicons/smile
Also the KF6-versions are old on my Ubuntu release so I think I was only able make KF6.8 compile reliably from source.

Post's attachments

Attachment icon qet-table-overflow.png 88.98 kb, 4 downloads since 2025-02-20 

Re: Qt 6.0 development and qelectrotech

I also just noticed these messages when starting Qet:

qt.core.qobject.connect: QObject::connect: No such signal QSignalMapper::mapped(QWidget *) in /home/magnus/qet-src/sources/qetapp.cpp:118
qt.core.qobject.connect: QObject::connect: No such signal QSignalMapper::mapped(QWidget *) in /home/magnus/qet-src/sources/qetdiagrameditor.cpp:98

Re: Qt 6.0 development and qelectrotech

1. Symbol library panel, the texts don't show until you hover over them with the mouse.

Seem 's fixed on https://github.com/qelectrotech/qelectr … nmodel.cpp

https://github.com/elevatormind/qelectr … ied&w=

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

Hello everyone,

A few months ago when I was looking to improve the font handling in dxf2elmt, I was trying to figure out what the font info string in the XML file is. I noticed it was using a built in method on QFontInfo that writes it out to a string, and I had to go dig into the Qt Source code to figure it out, as it appears to be undocumented.

I bring this up because back when I was researching this I came across this bug in Wireshark, that says the FontInfo string is not backwards compatible between Qt5 and Qt6: https://gitlab.com/wireshark/wireshark/-/issues/18553.

I forgot about it until just now when discussing a pull request plc-user made for dxf2elmt about text positioning. I just wanted to bring this to your attention since you guys are working on compiling it with Qt6, it's possible something will need to be done to make sure the font info from elemt files created with a Qt5 version works correctly with a version compiled with Qt6.

Re: Qt 6.0 development and qelectrotech

The font-info-string is documented in Qt-docs: https://doc.qt.io/qt-5/qfont.html#toString (same for Qt6)
There it says, that it's a string of 16 entries.
But as we see in our element-files, the font-info-string is build with only 10 comma-separated entries.

Fragen zu QET gehören in dieses Forum und werden nicht per PM beantwortet! – Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: Qt 6.0 development and qelectrotech

plc-user wrote:

The font-info-string is documented in Qt-docs: https://doc.qt.io/qt-5/qfont.html#toString (same for Qt6)
There it says, that it's a string of 16 entries.
But as we see in our element-files, the font-info-string is build with only 10 comma-separated entries.

Maybe that's what I was remembering that it was documented but wasn't quite right because the number of comma-seperated entries didn't match.

I looked into the Qt5 code to make sure the font string in dxf2elmt was being generated the same. I never looked at the Qt6 code since it wasn't relevant at the time. Looking at the doc for QFont::toString() in Qt5 and Qt6, it's identical, so I'm not really sure what the difference is or why it would have changed in the code. I'm just assuming the Wireshark issue is correct and there was a change however, and it might effect a future Qt6 version of QET, so it's good to be aware of it.