Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Creating UML Diagrams of a Qt application
QtWS25 Last Chance

Creating UML Diagrams of a Qt application

Scheduled Pinned Locked Moved Qt Creator and other tools
14 Posts 5 Posters 27.7k 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.
  • S Offline
    S Offline
    strangelookingnerd
    wrote on last edited by
    #1

    Hi!

    I'm looking for some tool to create class diagrams of qt applications. I tried various software like MS Visio, which i quite liked bcs of the "easy" GUI with not that much of unneeded features and stuff. But all of those tools where missing a nice and easy way to apply Qt elements in it - like data types as eg. QString and so on.

    Anyone here has experience with creating UML diagrams for Qt apps?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      I used "Umbrello":http://uml.sourceforge.net/ a few times. It can even import C++ headers defining classes. Unfortunately it was a bit on the crashy side and I had to make sure to save regularly:-)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maherali
        wrote on last edited by
        #3

        I'm looking for the same tool.
        It will be nice add to QtCreator.
        Actually there are lot of things missing in QTCreator like:

        autocomplete of parent class in the dialogue to create new class

        add the implementation for many functions in one click

        changing one parameter name relflects immediately on the header file or cpp file it will be nice to implement

        But the performance is still awesome.

        life is just lines of code

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #4

          [quote author="maherali" date="1316456224"]autocomplete of parent class in the dialogue to create new class[/quote]
          We do have this, don't we?
          [quote author="maherali" date="1316456224"]add the implementation for many functions in one click[/quote]
          Hmm... what?
          [quote author="maherali" date="1316456224"]changing one parameter name relflects immediately on the header file or cpp file it will be nice to implement[/quote]
          Qt Creator does already support refactoring. Just right-click on a class or variable and select 'Refactoring'.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maherali
            wrote on last edited by
            #5

            bq. We do have this, don’t we?

            when adding a new class using Add new item ... you will enter the class name, but when choosing the Base class, I want to choose QAbstractItemDelegate, it will be nice to autocomplete this, there is autocompletion for QObject, QWidget, QMainWindow, QDeclarativeItem (just these four)

            bq. Hmm… what?

            In header file try to write two functions f1,f2
            Try to select both functions, and refactor: oops there is no Add Implementation
            That's what I mean, it will be nice feature, usually I write the API prototype and then switch to CPP file to write the implementation, this way you will save yourself some navigations.

            bq. Qt Creator does already support refactoring

            You are right about refactoring, and CTRL+SHIFT+R but it's not practical, when you rename a variable in method prototype (in header file) you would be asked to rename the symbol in all your project, and then filter it, which is obviously not practical in most cases.
            There should be a smart behaviour: renaming the local variable, renaming the method parameter.

            Things that are very simple but will make QTCreator more productive.

            By the way when you want to override a protected event it will be nice to add the return value of the sizeHint() and just put it there to be QSize.

            life is just lines of code

            1 Reply Last reply
            0
            • S Offline
              S Offline
              strangelookingnerd
              wrote on last edited by
              #6

              So here is what i experienced so far:

              I tried using several free, trial or open source tools for reverse/forward engineering. Non of them came even close to my expectations of a either easy to use or actually working tool for C++/Qt Code - mostly because reverse engineering for C++ is way more complicated compared to Java or C# and those free tools couldn't handle it.
              I ended up using MS Visual Studio 2010 since i got it for free via MSDNAA (lucky me). There is not that much of features or options to play with for creating diagrams from code and vice versa. I'm hardly missing export to MS Visio or at least something besides image/pdf - but at least it works as i should :)
              Comercial tools are way, way, way, waaaaaaay too expensive for personal use and for beginners impossible to understand because of the number of features and possibilities to use them.

              And my 2 cents for QtCreator: Awesome to work with, even with the lack of some "extended" features. But especially for Beginners and Semi-Pros the way to go when creating a Qt application!

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on last edited by
                #7

                [quote author="maherali" date="1316460461"]
                In header file try to write two functions f1,f2
                Try to select both functions, and refactor: oops there is no Add Implementation
                That's what I mean, it will be nice feature, usually I write the API prototype and then switch to CPP file to write the implementation, this way you will save yourself some navigations.
                [/quote]

                Set the cursor on the method name in the header and hit Alt-Return, Creator will then ask if a stub implementation should be added to the implementation .cpp. It does not work with selecting two methods though, but you can quickly switch back to the header using F4.

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  maherali
                  wrote on last edited by
                  #8

                  @Volker
                  Thanks I know that, but selecting two methods or more at once is my point.

                  life is just lines of code

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    lgeyer
                    wrote on last edited by
                    #9

                    [quote author="Volker" date="1316467230"]Set the cursor on the method name in the header and hit Alt-Return, Creator will then ask if a stub implementation should be added to the implementation .cpp. It does not work with selecting two methods though, but you can quickly switch back to the header using F4.[/quote]

                    Do you know is there such functionality for adding a simple setter / getter implementation of a member variable too?

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      lgeyer
                      wrote on last edited by
                      #10

                      [quote author="maherali" date="1316460461"]when adding a new class using Add new item ... you will enter the class name, but when choosing the Base class, I want to choose QAbstractItemDelegate, it will be nice to autocomplete this, there is autocompletion for QObject, QWidget, QMainWindow, QDeclarativeItem (just these four)[/quote]

                      You can specify any base class, but for those four listed there will be additional code added (eg. the Q_OBJECT macro for QObject derived classes). But you are right - there is no auto-completion for currently known classes.

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tobias.hunger
                        wrote on last edited by
                        #11

                        Lukas: Nope, no getter/setter support yet. Feel free to send in a merge request implementing it though:-)

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          maherali
                          wrote on last edited by
                          #12

                          Hi folks
                          I know these are simple things but it's really what attract people to Visual Studio.

                          life is just lines of code

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            tobias.hunger
                            wrote on last edited by
                            #13

                            maherali: You greatly underestimate the complexity of the C++ language by calling those actions "simple things";-)

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              maherali
                              wrote on last edited by
                              #14

                              I know that it's not that simple because we have two files: header and cpp.
                              Actually it's very pleasant to work with QTCreator.

                              life is just lines of code

                              1 Reply Last reply
                              0

                              • Login

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