Hello
I want to build a tree.
Such that the image
Diagram2.png
Is there an example or a way ?
Thanks to all.
Hello
I want to build a tree.
Such that the image
Diagram2.png
Is there an example or a way ?
Thanks to all.
You have two options:
"regular" draw with QPainter on a widget.
Or , what I think would probably suit you better - use QGraphicsView.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
That is dependent on YOUR implementation!
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Have a look at the examples delivered with your Qt installation.
this example however might be close to what you need:
http://doc.trolltech.com/4.7/graphic...sticnodes.html
You just don't need the "elastic" part.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Hi,
I started a little project to do just that some time ago. Haven't finished it yet, but it may be helpfull.
Just see the thread : Mindmapping widget. There is an attachment in the last post with the code.
Best regards,
Marc
Hi NewLegend,
Works perfectly for me. Downloaded and build without problems. Will try and send it in a private message.
Regards,
Marc
Edit : seems youj can't attach anything to a private message. You'll find it attached to this reply.
Last edited by marcvanriet; 14th November 2010 at 22:43. Reason: updated contents
You want to build a rocket to go to the moon, but you don't want to spend more than 5 minutes on it or it will become too complex?
Accept that there isn't a solution for everything. Most of the time, you need to create something yourself.
You writing that reading a document to find out something is complex and you wanting to get everything ready made for free leads me to think you don't want to do this but need to do this.
If you need to do this, this is either homework or real work.
If you want to do this, you still might think it is complex (nothing wrong with that) but you'll ask questions to understand the things you find complex.
If you need to do this, you might think it is complex, but you will not ask questions to understand why things work the way they do, you'll just ask others to do the work for you.
It's commendable that some people actually want to help you. Me, however, have had multiple bad experiences helping people who don't know anything or do not show any will to learn anything.
Hi tbscope,
I agree with your comment. When reading many posts I think by myself the poster really hasn't got any notion of programming.
I myself have 20 years of programming experience in C / C++ / Pascal / Basic(s) / Python / Visual Foxpro / Delphi / assembler / ... Picked up Qt since about a year now as an alternative to Borland Delphi / C++ Builder.
But even with this experience, I find that it is sometimes difficult to learn something completely new from the samples because the samples show too many things at once. If you want to start using a QGraphicsview, the samples show lots and lots more than just creating a QGraphicsview and putting some objects in it. Also learning something completely new from the help files is not easy because they show all the details, instead of just the big perspective that you need at first. A few "examples for dummies" would be helpfull, that only show 1 or 2 features at a time.
I would advise everyone who starts using Qt to find yourself a good book. It gets you started creating your first programs and introduces the basic concepts. After that, you can find out more of the fancy stuff in the help or in the examples.
And of course... you MUST first know C/C++. If you don't, find a book on C/C++ first.
Best regards,
Marc
Have you read the maxim ''don't reinvent the wheel' ?
Do you want me to read books and folders to Make a set of Nodes?
I here to take advantage from the experiences of qt users such as, marcvanriet.
Do you want to have a logical tree or do you want to draw a tree that you already have? This thread goes into the direction of drawing a tree but the text in the post is not clear about it.
No one wants you to reinvent the wheel, just to understand how it work, if you want to use it.Have you read the maxim ''don't reinvent the wheel' ?
If you don't know how something works, you wont be able to use it.
The only way to know how something works, is, to learn how it works, and that is usually done either by reading, or by being taught by someone else.
The wheel is invented and ready to be used, if you want to use it, you will have to read about how it works.
I find Qt example code in the docs very good and it helps me always when I learn something new in Qt.
You have been give a path to a solution to your problem, but it seems you lack the drive to invest the time and apcience it take to understand it.
With that, no one help you, not even marcvanriet experience.
Try reading and understanding, and when you have SPECIFIC questions about things you don't understand you are more than welcome to ask here.
But saying "its too complected for me to read - give me something simple, ready to use that I don't have to think about" will not get you far.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Another good book for a C++ developer getting into Qt for the first time is
C++ GUI Programming with Qt3 by Jasmin Blanchette and Mark Summerfield.
Theres a Qt4 version of this book too I believe. (I think the version 3 book can be found freely available to download online too).
It does exactly what Marc says you need - ie, gives an entry point for experienced programmers to quickly get to grips with the basics of Qt before they delve into the details. Of course, if you dont like books theres always the source code to read
Chris.
The new book by Mark Summerfield (Advanced Qt Programming) is also excellent. It has extensive coverage of some of the newer Qt features, such as Phonon, Model / View, and Graphics / View frameworks. I haven't found anything else like it
Bookmarks