Problem with displaying graphs on a Qt canvas - c++

Let's say I'm a Qt newbie.
I want a good Qt library for displaying simple graphs. I've found the quanava library. But there is a problem. When I compiled a basic example it looks like graph edges are not painted properly when moving nodes. I don't have any idea where is a bug but this code seems to be rather simple. I think this is a problem with paint method in NodeItem class. Maybe someone has already solved this problem because this library is quite popular.

I usually go for Qwt for my graphing needs - a bit technical for "office graphs", but still, it works.

+1 for Qwt. It gets the job done, and is pretty configurable. The documentation is weak, but the number of examples are extensive enough to make up for it.

Ok, first of all saying graph i mean mathematical concept G=(V,E).
I improved quanava library, which is a very good starting point for graph visualization.

Related

fast way to get graphic output in c++ eclipse

Im currently working on an excercise about lagrange interpolation. I'm on the point where i would like to plot my data. So I thought there must be a quick and easy way to generate a window and draw some points in eclipse.
Well seams like I thought wrong. I searched on google and I found a shitload of different libarys, all of them either outdated, useless or with a really long installation guide.
The graphic output is really just to test my interpolation, so I want to spend as less time as possible with it. I remeber that there was a libary for java which was pretty simple. You could just import the libary, make a command to initialise a window, and then draw in it. There was no need for a installation and going from zero to a window with a circle was about three commands.
Is there really nothing like that for C++? What could I do to keep it as simple and fast (to install) as possible?
Thanks
Is there really nothing like that for C++?
Not really. C++ includes the "standard library" and that's it. The functionality you're looking for is provided by third-party libraries, as you've already found.
Asking for library recommendations is specifically off-topic on StackOverflow, by the way.

Image (Numbers/Letters) recognition

I'm learning C++ for half a year now (so programming in general) and this site always had the answers I was looking for. But now I came to the point where I need to ask as I couldn't find anything related to my question.
So I want to write a program that takes a screenshot of a particular area of the screen. This screenshot will ONLY contain playcards (so for example Hearth, Seven). What it should do now is return me which card it is, so the symbol and the number/letter.
I already made some researches and the most mentioned thing was the library "OpenCV".
So my question now: First is it even possible with my experience to write something like that?
If so, is this library the way to go? It seems really strong, maybe too strong for just the recognition of numbers/letters and four symbols? So could there be something easier?
And the last question, how could I get a screenshot of a particular area of the screen and not the whole screen and save it somewhere?
I hope you guys have a clue what I really want to know and it was understandable.
Greetings
Definitely use OpenCV. It is not too hard to get into, and once you do you will find it does basically everything you'd want. It makes image processing relatively straightforward and it can solve your problem in a lot of ways.
Here is a good place to start.

Node graph editor layout algorithm

I'm very much trying to do what was asked here:
http://www.qtcentre.org/threads/45028-Designing-a-Node-Editor-(Hint-Blender-Node-Editor)
Which is basically a blender style node editor using Qt. Creating rects with circles which can be drag/dropped is fairly simple to figure out (see the image below).
The issue I have is how the algorithm for connecting the circles between nodes would work. Also I don't know how this could be drawn efficiently using QGraphicsItem API's? I have seen QPainter::cubicTo() which looks like it may be the way to go?
I assume it somehow manages to find a none overlapping path? But it must also handle the case where it has to overlap?
And what about the user being able to move these lines around in case the algorithm has done a bad job? I don't think this would be simple to implement using QPainter::cubicTo() as you could only move the curves control points?
I don't think you'll get anyone posting the code for doing the whole lot here.
Well, I volunteer -- just in case someone still needs such a library.
It is a Qt-based node editor implemented on top of QGraphicsView.
A library consumer defines data models, the rest is done by the node editor.
Some features:
Model-view approach.
Models describe data types, number of input and outputs and optional embedded QWidget.
The Scene could be saved to file.
The rest similar projects were either not finished, not supported anymore or lacking some features.
https://github.com/paceholder/nodeeditor
I would suggest that you implement it without taking into consideration overlap but with the possibility of overriding how the connecting line is drawn.
It looks like there were some good replies on the Qt forum. I don't think you'll get anyone posting the code for doing the whole lot here.
Perhaps take a look at the Qt demos Graphics View/Elastic Nodes - There is code for the demo that you can use as a starting point, but it is a lot of work to get from there to something like the Blender node editor.
Another node editor to take a look at is SynthEdit or Synth Maker (has a nice one).

Graph edit framework

I was looking at MeVisLab and I wondered if anyone knows a good framework for making a user interface similar to the one they use. I like the designing flow with boxes and arrows thing.
What I would really like is to able to integrate with C++ using Qt, and perhaps export the graph to xml of something like that.
There is another example of the interface here:
I hope someone knows something
Qt's Graphics View is a "framework" which does a good bit of the handling for the kind of scenario you describe. It doesn't take much code to get off the ground and within striking range of what you're looking for:
http://doc.qt.nokia.com/latest/graphicsview-diagramscene.html
http://doc.qt.nokia.com/latest/graphicsview-elasticnodes.html
I'm not aware of any open-source Qt-based programs that offer exactly what you want already written. Just noticed IBM did open source "DataExplorer", which is interesting to me...I might go take a look at that myself:
http://www.research.ibm.com/dx/

3d max integration with c++, Cal3D where to start?

okay i'm making a game using c++ (for the engine) and openGL, now i've had lots of trouble using cal3d library for importing my 3d max models into my c++ project,
as a matter of fact i dunno where to even start, i can't find any decent guide and their documentation is pure shit really. i've been searching and trying stuff in this for over a month, but i don't even understand the file structure it uses so far :S
i really need some help, r there any other libraries? any decent guide i can use? i'm stuck
thnx alot
Rather than write your own exporter, consider using one of the built-in exporters for FBX, COLLADA, Crosswalk (.XSI), the Quake/Doom3 .MD3/.MD4 format, or even OBJ. It'll be much easier to parse the resulting file format on your end than to write and maintain a brand-new exporter.
Max is a complete pain for any kind of scripting or plugin. I'd suggest using maya instead if at all possible. You'll get better results for animation and rigging, too. I know it's not a direct answer to your question but part of the problem is the info for stuff like this is not easy to come by.