In my opinion, it would be a great improvement if we could get rid of these two! It seems that QET is the only project that uses these two libraries and they keep causing problems when using Qt-Creator. When searching the web for these two libraries it always comes back to the same results in this forum...

I will try your solution later and report back

EDIT:
As far as I can see, the code for ColorButton and ColorComboBox works fine and I could eliminate KWidgetsAddons from includes and libs!

I found a better solution for using KF6CoreAddons and KF6WidgetsAddons from distribution-packages!

In my local qelectrotech.pro I added these lines to global part, so that the include-files can be found:

INCLUDEPATH += /usr/include/KF6/KCoreAddons
INCLUDEPATH += /usr/include/KF6/KWidgetsAddons

The linker needs the information, where to find the libs, so I added these lines to the "unix"-section:

LIBS += /usr/lib/x86_64-linux-gnu/libKF6CoreAddons.so
LIBS += /usr/lib/x86_64-linux-gnu/libKF6WidgetsAddons.so

Now everything compiles and links fine without exclamation-marks or red texts in edit-lines in Qt-Creator!

This info might help someone install and use Qt-Creator on Linux to help develop QElectroTech!

128

(23 replies, posted in Code)

An explanation:
The height and width of the grid-points does not grow with zoom-factor in QET!
It is always the number of pixels on your screen for width/height of the grid-points.
Maybe a maximum of "5" isn't enough for High-DPI-Screens. But that could be changed very easily in sources...

129

(23 replies, posted in Code)

... works also in element-editor:

130

(23 replies, posted in Code)

@Re-searcher:
There is no need to shout!
I can read small letters, too!

What version of QElectroTech do you use?
Add screenshots of settings and grid to your next post.

I use Debian GNU/Linux trixie/sid and most recent QET-version from repository and also tried last binary from QET-download-site for windows this morning:
On both systems:
Changing grid-point-size works perfectly!

Maybe another user can share his/her experience with changing grid-points, too?

131

(23 replies, posted in Code)

Works also on win.

132

(23 replies, posted in Code)

some settings changed in forum: can only attach one file per post...
Here the same view with setting: 5px
note: there are some optical artifacts because of zoom-factor

133

(23 replies, posted in Code)

Would not have published that code, if it didn't work!
you need to zoom in or out once, after changing the setting to see the changes

Salut Laurent !

Thanks for your hint, but: Was already installed.

$ dpkg -l | grep pkg-config
ii  pkg-config:amd64   1.8.1-4  amd64  manage compile and link flags for libraries (transitional package)
$

Package will be replaced in (near) future:

$ apt-cache search pkg-config
pkgconf-bin - Verwaltung der Compiler- und Linker-Schalter für Bibliotheken (Programm
pkg-config - Verwaltung der Compiler- und Linker-Schalter für Bibliotheken (Übergangspaket)
pkgconf - Verwaltung der Compiler- und Linker-Schalter für Bibliotheken
$

In the meantime I could manage to compile QET-Sources, with the help of Qt-Creator:
I adjusted the settings for make-command in build-settings.
It feels a bit strange, as there is a message with an exclamation-mark that says that the build will be overwritten and the text in edit-field for build-dir is marked red...
But it compiles and I could already solve some more of the "#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)" - things! nomicons/smile

Hello everybody,

I have a strange phenomenon, that I would like to understand and get rid of...

There is a fresh installed Debian unstable with QET-Sources from github-branch "qt6-cmake".
From commandline everything compiles fine from cmake, qmake and make.

But sometimes it is much more comfortable to use an IDE to edit sourcefiles and start compilation by clicking a button.

So I installed Qt Creator 15.0.1 based on Qt 6.7.2 (GCC 14.2.0, x86_64) on top of it, imported the QET-codestyle-settings and clicked "compile".
And that's where the phenomenon comes to light: It won't compile, because some header-files cannot be found, see also attachment.

To remember: Everything compiles fine from commandline, so all headers are on the system:

$ dpkg -l | grep libkf6 | grep addons-dev
ii  libkf6coreaddons-dev:amd64  6.11.0-1  amd64  KDE Frameworks 6 addons to QtCore - development files
ii  libkf6widgetsaddons-dev     6.11.0-1  amd64  development files for kwidgetsaddons
$

So there is a setting in Qt-Creator that has to be adjusted to be able to compile from IDE, but I don't see it!

Is there someone who can help "cleaning my glasses"???

There is something basic missing ...

What version of QElectroTech do you use?
"menu" -> "Help" -> "About QElectroTech" -> tab "Version"

It seems, you're a new user of QElectroTech:
You should use this (or newer) version to have some additional info in log-file:
https://download.qelectrotech.org/qet/b … 5-02-17-1/

Now to the plugin:

Did you download the exe-file of plugin as suggested from github?
https://github.com/raulroda/qet_tb_gene … aster/dist

Did you rename the exe-file of plugin to "qet_tb_generator.exe"?

Did you copy the exe-file of plugin to "AppDataLocation"\binary\qet_tb_generator.exe ?

What does the log-file say about "App Data Location"?
"menu" -> "Help" -> "About QElectroTech" -> tab "Log"

What does the log-file say about "qet_tb_generator not found: ..." and "qet_tb_generator found here: ..."
after loading a project and clicking on "menu" -> "Project" -> "Launch the terminal block creation plugin"?
"menu" -> "Help" -> "About QElectroTech" -> tab "Log"


Please answer ALL questions!

137

(117 replies, posted in Code)

Now, what I wanted to write in my own name!!!

Sorry again!

----------------------------------

Ok ... as I don't compile with Qt6, yet ...

In Qt-docs there is a function for casting QString to QUuid.

When I eliminate the "#if QT_VERSION..." and use this code with Qt5:

    foreach (QDomElement qdo, uuid_list) {
        tmp_uuids_link << QUuid(qdo.attribute(QStringLiteral("uuid")));
    }
    qInfo() << "tmp_uuids_link: " << tmp_uuids_link;

there are no compilation-errors or warnings and when I open a project with XRefs it prints the UUIDs to log-file and in the diagram I see all XRefs as before.

I see no reason, that something like that should not work for Qt6...

138

(117 replies, posted in Code)

I wonder what is Qt5- or Qt6-specific about this line?
If I understand correctly, the linked elements are passed there ... they are also needed when compiling with Qt6.

Why don't you just download the binary from github-page and use that?
In that case you do not have to compile it yourself...
https://github.com/raulroda/qet_tb_gene … aster/dist

With a recent 0100-dev - version of QET you find something like this in the log-file
"menu" -> "Help" -> "About QElectroTech" -> tab "Log"

12:35:21.187 Info:  For data-files (user-/company-collections, titleblocks, etc.):
12:35:21.187 Info:  App Data Location: "C:/Tools/qelectrotech/conf"

Use your favorite file-browser to create the subdir "binary" in "App Data Location" and place binary "qet_tb_generator.exe" there.

Then you can use the plugin from QET-Project-Menu.

When starting the plugin, something like this is written to log-file:

12:36:54.665 Info:  project to use for qet_tb_generator:  "C:/Users/ich/Documents/ohne Namen.qet"
12:36:54.665 Info:  qet_tb_generator found here: "C:/Tools/qelectrotech/conf/binary/qet_tb_generator.exe"

Prerequisites for the plugin:
A saved project must be loaded. That project contains terminals that are named according to the scheme “X1:1, X1:2, etc” and are also connected somewhere.

jiridobrovolny wrote:

Please add option in program settings for change size of dots

Found a solution for changing grid-dot-size in general config-page that is saved in settings.
Implemented and published today.

141

(23 replies, posted in Code)

Created a PR at github for variable setting of grid-point-size.

Adjusted Erik's suggestion to be variable and have the possibility to set the value on general configuration-page and save setting in settings-file.

.

The revision-index is set per folio!
If you want to set all rev-indexes to the same global value, you need to use a project-variable and set this for each folio.

If you delete the post with the problem description, nobody will be able to understand what it was all about!
Nobody can find it in the forum search!

Your file is corrupt!
It contains many thousand lines only with a semicolon from line 7053!
Check with a text-editor and correct those lines!

EDIT:
You should also check your elements-collection for such lines!

146

(8 replies, posted in Import DXF)

Hello Vadoola,

no problem for me: Already deleted my fork!

147

(8 replies, posted in Import DXF)

and here is the Linux-version

148

(8 replies, posted in Import DXF)

Hello eya,

If the file-browser of converter shows the file, it should be found by other file-browsers, too...

What version of QElectroTech do you use?

Version 0.9 is a bit outdated in the meantime ... I recommend 0.100-dev

And it is very recommendet to use dxf2elmt instead of something else!

In current versions of QET there is a menu-entry in Element-editor to import a dxf with dxf2elmt.
Then you don't have to handle converted files, but can work with QET alone.

Vadoola, the current author of dxf2elmt, released new sources today.
I guess you run win? In the attachment you find the compiled binary.

149

(117 replies, posted in Code)

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.

150

(9 replies, posted in Code)

Hello elevatormind,
Salut Laurent ,

seems I forgot to test something with selective_move ...

But let me ask! What do you want to achieve with this line:

event->modifiers() == Qt::ControlModifier ? setPos(new_pos) : setPos(Diagram::snapToGrid(new_pos));

If you mean to check for additionally pressed <Ctrl> the line would have to look like this:

event->modifiers() == (Qt::ControlModifier | Qt::ShiftModifier) ? setPos(new_pos) : setPos(Diagram::snapToGrid(new_pos));

If you mean to reduce step-size for movement of texts by additionally pressing <Ctrl>: It does not work!
Together with <Shift>+<Ctrl>+<MouseClickAndMove> the view of design-editor is moved!

As a thought:
When I want to move the texts it is mostly only some points. Why don't we just forget about moving texts by grid-distance, but only move by points?
Then we would not need any additional modifier.

Then we would need to change the above line 588 of sources/qetgraphicsitem/dynamicelementtextitem.cpp by only this:

setPos(new_pos);

I tried some different combinations of modifiers, but it seems that we run out of possible combinations at that point...

Best regards
  plc-user