I'm using QLabel and QPixmap to show image in my program. I would like to use something like snipping tool in Windows to let user to select part of image that will be processed further.
For example, I load image, user select part of it (rectangle), and it shows it is selected and I can read coordinates that are selected, so I can proceed with processing only part of image.
I don't think this is possible with Qt without a fair amount of coding.
Maybe a third-party Qt widget, such as https://github.com/dimkanovikov/ImageCropper, is what you're looking for?
Related
I have a tab that is to display data that is to be prepared for a report. Kind of like a preview. What I want is to take a screenshot of graph generated in another tab.
Kind of similar to scanning an image. So the initial tab generates 3 graphs under each other that fit in the screen. I basically want the screen shots of the graphs to post them along with the data in the second tab.
The second image is where I want the content of the first image to be posted. How do I go on about that?
I'm looking to make a sprite animation editor. I have the loading of my custom animation file done but now need to get the actual ui started. I'm really just stuck on what widgets I would use to actually play my animation. I need to be able to go to certain frame, play, pause, loop, etc. Once I'm done with the viewing portion I plan on adding in the editing.
I've seen AnimatedSprite in qt docs but that seems to only allow playback of sprites in the same file. In my situation sprites can be from multiple image files and sometimes doesn't follow a grid like sprite cutter.
First of all, you should decide whether you want to use QML or Widgets. AnimatedSprite is QML related class. All widget-related classes starts with "Q" letter.
If you decide to use Qt Widgets, I would recommend to take a look at Qt Animation Framework in combination with Qt Graphics View Framework. Most likely it will not let you do everything you want out of box, but it should provide you with a rich set of useful tools.
If you need here are some examples.
Hope it helps.
Have a look at QMovie. This class may provide all the methods you need, as long as you only want to use it for viewing. The QMovie can be passed to a QLabel to show the animation.
QMovie however supports only gif out of the box (and there is a third party plugin for apng files). You would probably have to create your own image handle plugin to support your format.
If thats not applicable or to complicated, you will most likely have to create your own custom widget. Have a look at the painter example. Playing an animation is not that hard if you have all the frames. A simple QTimer to change the image to be drawn in a constant rate should work.
I'm Having classes on computational design at university through AutoCad and we are asked to model some drawings. I'd like to know if there's any way to make the image I'm modelling appear on top of the screen while I hold some key, and go back to the model as soon as I release it.
There is no such built-in feature in AutoCAD. You can however insert the image in the background. Or you can write your own plugin to do that.
1) You can use the Attach command to attach your image in AutoCAD
2) Once the image is attached, then you can create your model on top of the image by using the "DR" alias for Draworder and select the image to place on top or behind your model.
3) Select the middle mouse button to Pan around and when you do this, your image file will disappear temporarily until you release your mouse button.
Hope that helps!
I have a small app that renders an image. It's in .ppm format and opens nicely in Mac's Xee image viewer. The image is created in the default project folder.
However, the user doesn't know where the image is after it is rendered and I would like to open it automatically or perhaps offer where to save the image before it is created.
That is the first problem. The second problem is .ppm - it's not opened by default on Windows, you need Irfan Viewer or something alike.
Is there a way to solve both those problems easily in Qt? For instance, the image is created where the user wants and my app displays it in that ppm format without using some other software? And If a user wants to reopen the image, I should probably make it possible, as well.
I am not a Qt, nor a C++ developer so I am struggling a bit with this, but I have to do it.
Thanks in advance for the tips and advices.
If you convert your image to a QImage (if it's not one already), you can specify where and in what format to save it when calling the QImage::save method.
I have a software which displays small image thumbnails at the bottom of the screen:
But these sample 5 are just a small portion of all the available ones. I am looking for ideas of libraries or just available open source code that would let me animate them as they switch to the previous/next ones in the list when the arrow button is pressed or the user flicks them left/right like on an ipod.
I am NOT using Qt (as another answer suggests using it).
Hey my be you need this one, has got nice animations and its native
http://www.codeproject.com/Articles/21006/Not-just-a-image-list-control-Neat-3D-iTunes-style