Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Creating a multi purpose node editor, if there is none available
QtWS25 Last Chance

Creating a multi purpose node editor, if there is none available

Scheduled Pinned Locked Moved Unsolved General and Desktop
25 Posts 8 Posters 14.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    joejoo
    wrote on 6 Aug 2017, 03:50 last edited by
    #1

    I am looking for an easy way to have my lab workers to process data from our experiments. I did choose QT as main framework, since we have equal number of OSX and Win machines at the lab, so this makes things easier.

    Now, since I am one of the 2 developers in the lab (I do work as researcher but I know also how to program a bit), I am trying to make something simple to handle for our lab technicians and researchers, which has basic computer skills. I did choose to use a node based editor to have them line up blocks, so I can then convert these in experiments and have everything set up in our computers; although I did not find anything ready to use.

    I am willing to write my own implementation of a basic node based interface, in which case I would appreciate any sort of pointer and help about where to start...but if there is something already written that I can leverage upon, I would take it with joy.

    Thanks in advance!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 6 Aug 2017, 10:32 last edited by
      #2

      Hi
      Im not sure what the term "Node editor" covers here
      but what about
      http://doc.qt.io/qt-5/qtwidgets-graphicsview-diagramscene-example.html
      for a starting point.

      1 Reply Last reply
      2
      • J Offline
        J Offline
        joejoo
        wrote on 6 Aug 2017, 18:27 last edited by joejoo 8 Jun 2017, 18:31
        #3

        Thanks a lot! This is a great start to grasp how thing works in Qt graphic libraries.

        It is similar to what I had in mind; Now I need to figure out if there is a way to make it more similar to what you see in a 3D program like Blender or Maya for example; where you have input and output and you connect them via lines.

        To give an idea of an experiment, imagine this

        CompoundA get mixed in SolutionA; the output processed in a spectrometer, then you add a ReagentA, which get tested again in the spectrometer. Once done, you separate by centrifuge the ReagentA and the mixture; then try ReagentB and so on

        As you can see it is important to know what goes in and what goes out; which is why I took these node editors for 3d shaders as example for what I want to obtain, since they are clear, straightforward and can't really mess up anything when you have a node for each compound, reagent and solution; on top of the machinery that does the various operations.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          patrik08
          wrote on 6 Aug 2017, 21:30 last edited by
          #4

          it share data i think...
          https://www.youtube.com/watch?v=pxMXjSvlOFw
          https://github.com/paceholder/nodeeditor

          J 1 Reply Last reply 7 Aug 2017, 19:30
          1
          • P patrik08
            6 Aug 2017, 21:30

            it share data i think...
            https://www.youtube.com/watch?v=pxMXjSvlOFw
            https://github.com/paceholder/nodeeditor

            J Offline
            J Offline
            joejoo
            wrote on 7 Aug 2017, 19:30 last edited by
            #5

            @patrik08 Very nice! This is exactly what I was looking for.

            BTW how do you use the source code? Do you have to compile it first? I am new to QT, and the readme did not have much info about how to use it. Thanks!

            M 1 Reply Last reply 7 Aug 2017, 20:17
            0
            • J joejoo
              7 Aug 2017, 19:30

              @patrik08 Very nice! This is exactly what I was looking for.

              BTW how do you use the source code? Do you have to compile it first? I am new to QT, and the readme did not have much info about how to use it. Thanks!

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 7 Aug 2017, 20:17 last edited by
              #6

              @joejoo
              Hi
              It seems to be a Cmake project so you need to install that and then build the app using
              the project file provided.
              Its called a "General-purpose Qt-based library" so it might create a lib to use.

              J 1 Reply Last reply 8 Aug 2017, 05:12
              0
              • M mrjj
                7 Aug 2017, 20:17

                @joejoo
                Hi
                It seems to be a Cmake project so you need to install that and then build the app using
                the project file provided.
                Its called a "General-purpose Qt-based library" so it might create a lib to use.

                J Offline
                J Offline
                joejoo
                wrote on 8 Aug 2017, 05:12 last edited by
                #7

                @mrjj said in Creating a multi purpose node editor, if there is none available:

                @joejoo
                Hi
                It seems to be a Cmake project so you need to install that and then build the app using
                the project file provided.
                Its called a "General-purpose Qt-based library" so it might create a lib to use.

                Thanks a lot for the hints!

                So I did install cmake; in my program folder (I use W10); while QT is in the root of my C drive.

                After installation I can see that running cmake using the Windows power shell is working, so I assume it did set the environment variable correctly.

                I did open the source folder and ran cmake in it; although I get this error:

                CMake Error at C:/Qt/5.9.1/msvc2017_64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:63 (file):
                  file attempted to create a directory:
                 C:/Users/labdev/Desktop/nodeeditor-master/resources into a source directory.
                

                From my understanding, it is trying to create a dir but it fail? I did run powershell as administrator, so I am not sure why it is getting this error. Should I make changes to the CMakeList file? Just shooting in the dark here

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 8 Aug 2017, 07:00 last edited by
                  #8

                  Hi,

                  Can you show what you did before building your project ?

                  Usually building cmake projects starts by creating a build folder either at the root of the project sources or beside it, then go into it and call cmake .. if you are still in project sources or cmake ../myprojectname if you put the build folder beside it.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  J 1 Reply Last reply 8 Aug 2017, 20:33
                  1
                  • S SGaist
                    8 Aug 2017, 07:00

                    Hi,

                    Can you show what you did before building your project ?

                    Usually building cmake projects starts by creating a build folder either at the root of the project sources or beside it, then go into it and call cmake .. if you are still in project sources or cmake ../myprojectname if you put the build folder beside it.

                    J Offline
                    J Offline
                    joejoo
                    wrote on 8 Aug 2017, 20:33 last edited by
                    #9

                    @SGaist

                    Hi,

                    I did get the zip file from the repo, unzipped in my download folder and then created a build folder in it.

                    Then I did open powershell as admin, did cd into the build folder and then ran cmake ..
                    I did try also to run cmake . in the root of the project folder but I get the same error as printed above.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 8 Aug 2017, 21:54 last edited by
                      #10

                      Just built it on macOS. without any problem...

                      Which version of cmake are you using ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      J 1 Reply Last reply 8 Aug 2017, 22:47
                      1
                      • S SGaist
                        8 Aug 2017, 21:54

                        Just built it on macOS. without any problem...

                        Which version of cmake are you using ?

                        J Offline
                        J Offline
                        joejoo
                        wrote on 8 Aug 2017, 22:47 last edited by
                        #11

                        @SGaist
                        I see, I am on Windows 10 BTW.

                        I did download the latest on the Cmake website: 3.9.0 for x64. I have latest Qt 5.9 and Visual Studio 2017 community edition

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 9 Aug 2017, 06:48 last edited by
                          #12

                          What shell are you starting when you want to compile the application ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            joejoo
                            wrote on 9 Aug 2017, 19:23 last edited by
                            #13

                            powershell; does the same either if I start it as admin or not

                            M 1 Reply Last reply 9 Aug 2017, 20:56
                            0
                            • J joejoo
                              9 Aug 2017, 19:23

                              powershell; does the same either if I start it as admin or not

                              M Offline
                              M Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on 9 Aug 2017, 20:56 last edited by
                              #14

                              @joejoo
                              Hi
                              Powershell sound wrong to me. Normally visual studio have a developer cmd prompt link that
                              set all the environment variables etc. (not tried 2017)

                              https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs

                              did they make it a powershell thing in 2017 ?

                              J 1 Reply Last reply 9 Aug 2017, 22:14
                              1
                              • M mrjj
                                9 Aug 2017, 20:56

                                @joejoo
                                Hi
                                Powershell sound wrong to me. Normally visual studio have a developer cmd prompt link that
                                set all the environment variables etc. (not tried 2017)

                                https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs

                                did they make it a powershell thing in 2017 ?

                                J Offline
                                J Offline
                                joejoo
                                wrote on 9 Aug 2017, 22:14 last edited by
                                #15

                                @mrjj said in Creating a multi purpose node editor, if there is none available:

                                @joejoo
                                Hi
                                Powershell sound wrong to me. Normally visual studio have a developer cmd prompt link that
                                set all the environment variables etc. (not tried 2017)

                                https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs

                                did they make it a powershell thing in 2017 ?

                                Well, I don't even get to the point where VS is in the picture; I am running Cmake; to create the VS files that I will open in that environment. Instead I get nothing because cmake error out saying that it can't create a folder.

                                On windows I know no other shell, beside powershell. I use that also to build and run VS project if I don't need the IDE launched.
                                At this point I shall try with OSX; since there it seems to build without problems, and see if there is any difference.

                                M 1 Reply Last reply 9 Aug 2017, 22:28
                                0
                                • J joejoo
                                  9 Aug 2017, 22:14

                                  @mrjj said in Creating a multi purpose node editor, if there is none available:

                                  @joejoo
                                  Hi
                                  Powershell sound wrong to me. Normally visual studio have a developer cmd prompt link that
                                  set all the environment variables etc. (not tried 2017)

                                  https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs

                                  did they make it a powershell thing in 2017 ?

                                  Well, I don't even get to the point where VS is in the picture; I am running Cmake; to create the VS files that I will open in that environment. Instead I get nothing because cmake error out saying that it can't create a folder.

                                  On windows I know no other shell, beside powershell. I use that also to build and run VS project if I don't need the IDE launched.
                                  At this point I shall try with OSX; since there it seems to build without problems, and see if there is any difference.

                                  M Offline
                                  M Offline
                                  mrjj
                                  Lifetime Qt Champion
                                  wrote on 9 Aug 2017, 22:28 last edited by
                                  #16

                                  @joejoo
                                  Its a bit odd.
                                  Just downloaded , unpacked and build it with vs2015
                                  with
                                  cmake .. -DCMAKE_PREFIX_PATH="C:\Qt\5.7\msvc2015\lib\cmake\Qt5"
                                  No issues what so ever.
                                  alt text

                                  J 1 Reply Last reply 10 Aug 2017, 00:46
                                  1
                                  • M mrjj
                                    9 Aug 2017, 22:28

                                    @joejoo
                                    Its a bit odd.
                                    Just downloaded , unpacked and build it with vs2015
                                    with
                                    cmake .. -DCMAKE_PREFIX_PATH="C:\Qt\5.7\msvc2015\lib\cmake\Qt5"
                                    No issues what so ever.
                                    alt text

                                    J Offline
                                    J Offline
                                    joejoo
                                    wrote on 10 Aug 2017, 00:46 last edited by
                                    #17

                                    @mrjj said in Creating a multi purpose node editor, if there is none available:

                                    @joejoo
                                    Its a bit odd.
                                    Just downloaded , unpacked and build it with vs2015
                                    with
                                    cmake .. -DCMAKE_PREFIX_PATH="C:\Qt\5.7\msvc2015\lib\cmake\Qt5"
                                    No issues what so ever.
                                    alt text

                                    I see, you are using a different command prompt, I never ever heard of that; but it is installed with VS somehow.

                                    I did build with the same string you used (I have a different QT version though, but it is building!

                                    Now I did run the solution and I get a build error because I am building in X64 instead of x86, trying to change the project configuration. In the worst case I have to re-install QT since I have only X64 folder installed; I didn't think that I may need the x86, but if this project require it, then I have to install and build using that version.

                                    1 Reply Last reply
                                    0
                                    • J Offline
                                      J Offline
                                      joejoo
                                      wrote on 10 Aug 2017, 02:54 last edited by
                                      #18

                                      Finally I was successful in building the solution!

                                      The trick was that I needed the VS2017 QT install that support x86, once used that for DCMAKE_PREFIX_PATH it did build the solution and VS2017 was happy to build all the various examples and items in the solution.

                                      Now the problem is that each exe is complaing because QT5Widgets.dll cannot be found. I thought that cmake and VS would be able to find all the required DLL; do I need to import something before build the solution, or do I have to set some global variables?

                                      Sorry for the hassle; but the QT environment, when you work outside QT designer is quite daunting for a beginner.

                                      M 1 Reply Last reply 10 Aug 2017, 08:19
                                      1
                                      • J joejoo
                                        10 Aug 2017, 02:54

                                        Finally I was successful in building the solution!

                                        The trick was that I needed the VS2017 QT install that support x86, once used that for DCMAKE_PREFIX_PATH it did build the solution and VS2017 was happy to build all the various examples and items in the solution.

                                        Now the problem is that each exe is complaing because QT5Widgets.dll cannot be found. I thought that cmake and VS would be able to find all the required DLL; do I need to import something before build the solution, or do I have to set some global variables?

                                        Sorry for the hassle; but the QT environment, when you work outside QT designer is quite daunting for a beginner.

                                        M Offline
                                        M Offline
                                        mrjj
                                        Lifetime Qt Champion
                                        wrote on 10 Aug 2017, 08:19 last edited by
                                        #19

                                        @joejoo said in Creating a multi purpose node editor, if there is none available:

                                        exe is complaing because QT5Widgets.dll

                                        Hi
                                        That is normal.
                                        You need to make a deployment folder for it with the needed dlls.

                                        http://www.tripleboot.org/?p=138

                                        note there is the windeploy tool to help

                                        1 Reply Last reply
                                        0
                                        • P Offline
                                          P Offline
                                          patrik08
                                          wrote on 10 Aug 2017, 08:32 last edited by
                                          #20

                                          cmake file is easy to read
                                          https://github.com/paceholder/nodeeditor/blob/master/CMakeLists.txt

                                          take all source from https://github.com/paceholder/nodeeditor

                                          remove example folder move in other dir …

                                          target_link_libraries(nodes
                                          Qt5::Core
                                          Qt5::Widgets
                                          Qt5::Gui
                                          Qt5::OpenGL)

                                          at top dir one console
                                          qmake -project after you have a pro file

                                          fill pro file Qt5::Core Qt5::Widgets Qt5::Gui Qt5::OpenGL as module frameworks
                                          template static libs

                                          take example set pro file to static lib and dir…
                                          and you build one sample…

                                          1 Reply Last reply
                                          0

                                          9/25

                                          8 Aug 2017, 20:33

                                          topic:navigator.unread, 16
                                          • Login

                                          • Login or register to search.
                                          9 out of 25
                                          • First post
                                            9/25
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved