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. [SOLVED] What part of Qt should I use for 2D graphics in circuit diagram editor?
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] What part of Qt should I use for 2D graphics in circuit diagram editor?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 4.9k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    Bambo
    wrote on 18 Jan 2013, 15:28 last edited by
    #1

    Hi,
    i want to create a circuit diagram editor. I don't know what parts of Qt should i use for painting 2D diagrams. I found QPainter, OpenGL and QGraphicsScene. What is the best for my problem? I found this example: http://qt-project.org/doc/qt-5.0/qtwidgets/graphicsview-diagramscene.html . My diagram editor will look like similar, but it will be more complicated. I would like to drawn diagram can be exported to svg. What would you recommended to me?

    Thanks for all replies and sorry for my bad english.

    1 Reply Last reply
    0
    • U Offline
      U Offline
      utcenter
      wrote on 18 Jan 2013, 16:07 last edited by
      #2

      Your options are between the scenegraph and QGraphicsScene, the first one always uses openGL through QML and allows for occasional QPainter C++ extenssion, the second one can use openGL or use software rendering and is pure C++. If you plan to run simulations on your circuits a.k.a SPICE that would best be implemented in pure C++ for performance reasons.

      Using QGraphicsScene should be more scalable, if you plan to create large circuits, using QML on the other hand will offer significantly faster development, but you have to interface your custom C++ components if you want top performance. For basic diagrams with no interactive simulations QML is the better choice, and last but not least, the documentation and samples on QGraphicsScene/View/Item is significantly more detailed and plentiful, and contains pretty much everything you will need to accomplish the task, with QML you will end up asking a lot of questions and waiting for answers that are not guaranteed to come quickly or at all.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Bambo
        wrote on 18 Jan 2013, 16:21 last edited by
        #3

        [quote author="utcenter" date="1358525277"]Your options ...[/quote]
        I want write it completely in C++. So do you mean the best choice is certainly QGraphicsScene?

        1 Reply Last reply
        0
        • U Offline
          U Offline
          utcenter
          wrote on 18 Jan 2013, 16:30 last edited by
          #4

          Best as in only - yes :) There is no public C++ API to use QtQuick, at least for the foreseeable future, so go ahead.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Bambo
            wrote on 18 Jan 2013, 16:34 last edited by
            #5

            OK, thank you very much! :)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goblincoding
              wrote on 19 Jan 2013, 08:46 last edited by
              #6

              Have you heard of "Fritzing":http://fritzing.org/ ?

              http://www.goblincoding.com

              1 Reply Last reply
              0
              • T Offline
                T Offline
                TioRoy
                wrote on 21 Jan 2013, 02:32 last edited by
                #7

                Or "Qucs":http://qucs.sourceforge.net/ ?

                1 Reply Last reply
                0

                1/7

                18 Jan 2013, 15:28

                • Login

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