How can I know the coordinates of the displayed part of an image in the Qgraphicsview in QT ?
Related
I have video analysis c++ code and porting to the QT Creator for gui requirements.
We are detecting certain shapes and items from the video stream and adjust their size ie 100x100 and want to display on the screen. We can display through Label but only one QpixMap item.
What is the best way to show detected images automatically on a widget such as last 20 one that autosized?
Is there any a small code sample to start with it to show us the direction?
Thanks.
You could subclass QWidget and reimplement paintEvent to paint whatever you need using QPainter.
See Basic Drawing Example for details:
http://doc.qt.io/qt-5/qtwidgets-painting-basicdrawing-example.html
javafx does not load image in the correct rotation after the image is rotated by windows rotate from explorer
reproduce:
1. select a image using windows explorer
2. click the rotate left button
3. load the image using javafx(the below code)
4. the image is loaded but not rotated
is there anything i missing?
ImageView iview = new ImageView();
Image image = new Image("/path/to/image");
iview.setImage(image);
os: windows10
java version: 1.8
JavaFX loads the image as it is. However, some images have a rotation flag in the EXIF information which tells the viewing application in which rotation the image is to be displayed. You would have to read the metadata of the image and rotate the image accordingly.
And what ItachiUchiha said, you need to save the image after rotating it.
I am using Qt 5.5.0 and Qt3D 2.0.
I want to display video as texture.
I can display and rotate only one image.
How can I add a video instead of an image?
I'm kind of newbie in both OSG and Qt, still I'm trying to make Qt HUD upon my OSG window, what I want is Qt interface elements fixed inside OSG scene, not spinning with the model. The thing is, I need Qt elements INSIDE osg scene, not OSG scene inside Qt window (like in OSGviewerQt example).
What I've got yet is OSGQtWidgets example with --useWidgetImage --fullscreen arguments, which shows fixed Qt controls ontop of OSG Model. The thing is, it creates new (FIXED) camera for qt element ontop of OSG model -- because of that, user cannot spin and move OSG model because camera is not transparent.
So the question is: is there a way to make transparent camera with useable Qt elements in it? Or is there some other way to achieve my goals?
Thank you in advance!
I am unable to try this out for myself first, but you can try setting a property on the Orthogonal "HUD" camera to let events pass through to the regular OSG viewer:
camera->setAllowEventFocus(false);
If you're using a recent version of osgQtWidgets.cpp, you'd want to add this around line 414.
I am using Qt to construct an application. My MainWindow consists of an image of a map which I would like to be resized to the fit the window. This means when the window gets smaller the image gets smaller and vice versa. When the user selects a point on that image I want to remove this feature. I am new to Qt and haven't been able to figure this out. I am using QGraphicsView for this.
QGraphicsView::fitInView