simulton / QSchematic

A library that allows creating diagrams such as flowcharts or even proper engineering schematics within a Qt application.
https://simulton.com
MIT License
231 stars 60 forks source link

why I can't open this project with Qt Creator(Qt6.3.2)? #38

Closed isteelcx closed 1 year ago

isteelcx commented 1 year ago

see the detail

Tectu commented 1 year ago

Can you please provide a bit more details such as what "can't open means"? Do you get an error message?

Edit: A cmake improvement for Qt6 support was just pushed to the master branch.

isteelcx commented 1 year ago

here is Qt6.3.2 open error : 图片 why can't Qt5.14.2 open neither? 图片

isteelcx commented 1 year ago

and can you update the way to open this project by the root CMakeLists.txt? 图片

isteelcx commented 1 year ago

Objectively speaking, as the same nodeeditor framework, repositorie (https://github.com/paceholder/nodeeditor.git) is a friendly project , but I think your project is more beautiful and has a better programming style, so I would like you to update the basic support (including easy and fast project loading motheds).

Tectu commented 1 year ago

The error your getting should have been resolved by yesterdays commit 7fb0ae37f16cd825125f2f56809426eb7d7e8597. Could you pull the latest master branch and try again?

A small disclaimer: This library has mainly been used with Qt5 so far. Qt6 builds were almost only synthetic so far. If you encounter any Qt6 issues please let us know so we can fix those.

Objectively speaking, as the same nodeeditor framework, repositorie (https://github.com/paceholder/nodeeditor.git) is a friendly project , but I think your project is more beautiful and has a better programming style, so I would like you to update the basic support (including easy and fast project loading motheds).

Thank you for your kind words. I checked out paceholder/nodeeditor before I started writing this QSchematic library. It does seem like a good project as well but didn't fit my requirements back then. There's always room for more than one (good) option anyway :)

isteelcx commented 1 year ago

thank you for support, now can be open by Qt6 and build pass

isteelcx commented 1 year ago
  1. Can you talk about your understanding of (paceholder/nodeeditor)?

  2. What do you think are the advantages and disadvantages of this project? First of all, I think its advantages are the realization of node based editor based on Model-View design pattern, with strong customization and extensibility. As for its disadvantages, I think its code writing style is not good, and the writing is not beautiful enough. Strange indentation and naming affect the aesthetic feeling. And there is no support for projects such as thedmd/imgui-node-editor where a small node can be included in a large node.

  3. What features do you think a fully scalable node based editor architecture should meet?

isteelcx commented 1 year ago

Another question, do you follow the official Qt coding specification when you write your code? https://wiki.qt.io/Qt_Coding_Style

Tectu commented 1 year ago

Sorry for the late reply. I took some time to figure out how to respond to your question. I came to the conclusion that the best I can tell you is the universal advice in a situation like this: Evaluate and pick yourself. I cannot possible provide you with any objective, 100% non-biased opinion/answer. Furthermore, some of the reasons which resulted in me starting to write QSchematic all those years ago were required features which were missing in paceholder/nodeeditor. Most likely some, if not all of those features have been added by now. After all, it has been almost eight years. One thing that can be called an objective assertion: QSchematic is backed by a company, not just a single individual.

Another question, do you follow the official Qt coding specification when you write your code?

No, we don't. However, coding styles are usually a personal preference. Most often only novices and religious people care about which coding style is being used while everybody else just cares about consistency. Unfortunately, the QSchematic code base coding style is not consistent as of today. That is one of the things we will rectify with the 2.0 release.

isteelcx commented 1 year ago

will QSchematic support Group Nodes and connet line multiple styles,just like: image

image

and changeable nodes shapes: image

isteelcx commented 1 year ago

@Tectu After a period of experience,this is realy a great project

Tectu commented 1 year ago

As of today, QSchematic provides full visual customization to the user ("styles" and "shapes"). You can re-implement the ::pain() function of each item. This is actually demonstrated in the supplied demo. A custom style is implemented (the gray items with the drop shadow) and custom shapes are demonstrated with the "Flow Start" and "Flow End" items.

Group nodes are implicitly supported. i.e. what you showed in your screenshot works with QSchematic. However, the built-in netlist generator currently doesn't support nested/grouped nodes. This is something that is on our short-term ToDo list as we need that feature ourselves in a product :)

isteelcx commented 1 year ago

Will you change the basic architecture of QSchematic in the future?

Tectu commented 1 year ago

What kind of questions are these? Will you change your kidney in the future? Probably not, right? But you still wouldn't promise it (I assume) :D

In general we try not to introduce breaking changes. For example, since the last release we added a new item RectItem which facilitates mouse resizing & rotation. Previously, this was baked into the Node class. However, that functionality can be useful elsewhere (such as in the newly introduced QWidget wrapper) so we outsourced it into a separate class. But this was done in a way that the changes are completely transparent to any consumer. No changes in your application code are necessary.

Should there ever be drastic changes to the QSchematic library we'll release the next major version. This way existing consumers will continue to work while paving a way for migrating.

That being said, the library exists since 2015 and didn't undergo any drastic changes so far.

isteelcx commented 1 year ago

I hope you can understand my concern about these particularities. I prefer software architecture issues to functional detail changes, because this affects the stability of the development model in the long run. As I was worried earlier, maybe at some point you suddenly have a more sophisticated architectural design concept and overturn the current project.

Tectu commented 1 year ago

There are currently no plans to go down that road. If that would happen, it would simply be a new major version the same way that most software is being developed & distributed :)

isteelcx commented 1 year ago

Could you share your feature update schedule? Such as the node grouping mentioned earlier

Tectu commented 1 year ago

Closing this due to inactivity.