The scene/view displays the actual size of the image, so if the image is bigger than the view, it wont fit.
Hmmm. Thanks. Didn't know this
Printable View
The scene/view displays the actual size of the image, so if the image is bigger than the view, it wont fit. What I wish to do is if the image's bounds are bigger than the graphicsView or the Scene, the image must fit into the view keeping aspectRatio. if the image's bounds are smaller there is no need for fitting the image to the view/scene.
Hmmm. Thanks. Didn't know this. . . . . will be back with this problem soon, still have other problems in this project... And I am running out of time.
Alas, you could have used chainlink and been done by now...:p
You might be interested to know that it is possible to link the (non-gui) chainlink engine into any Qt program and make calls to chainlink from within your C++ code like this
Code:
chainlink_workspace *WS=new_chainlink_workspace(); //... QImage X; //initialize X ... WS->set_variable("my_image","QImage",&QImage); WS->execute_command("my_image=custom_function(my_image);"); WS->get_variable("my_image","QImage",&QImage); //display X in your app
Here custom_function would be written in C++ from within the ChainLink GUI.
Some people might ask -- what's the advantage of doing it this way? Why can't I just link to "custom_function" from within my app? My response -- I can think of at least 50 reasons to use the chainlink approach ...
But I've bothered you too much with these things... just a suggestion.... good luck with your deadline. :)
magland, chainlink seems to be very useful... how is the setup done?
What imports should I have within my Qt/c++ project?
While running my Qt/c++ project, is chainlink supposed to be running too? or I only need the imports?
is #include "chainlink.base.h" the import that I need?
It seems http://chainlink.sourceforge.net/documentation.html
is insufficient
Yes, I know the docs are insufficient (I like coding more than writing docs, but I do realize the importance of the latter)...
You would simply link your project to a (non-gui) "chainlink_plugin.dll" library (I assume you are using windows), and chainlink does not need to be running in the background.
If you want to pursue this, contact me privately, and I'll guide you through the installation and undocumented features. If you have success, then this would help me know how to document these things. Therefore, it could benefit both of us, and others.
JM
Hmmm, I've executed the instruction in the site
I searched through my entire chainlink installation and I found no "chainlink_plugin.dll".Quote:
* Finally, if you are compiling from source on Windows, then run:
> build.bat
> chainlink.bat
I tried to search it under google, I entered "chainlink_plugin.dll". . . No search results found, where can I possibly acquire this dll. . . Finally, assuming I've finished my project using chainlink, can I get it to run under a linux platform? (because DLLs are for windows only right?)
already PM'ed you.
Sincnarf,
This "chainlink_plugin.dll" feature is only contained in the development version of chainlink. If you are serious about pursuing this route, I would guide you through the procedure, sending you the necessary files. Yes, it will also work in linux, although I have not tested this particular feature there - so some tweaking may be necessary.
Pls contact me by email if you want to purue it... and I will give you step by step instructions.
JM
Jeremy dot Magland at gmail dot com