Cross Platform Screenshot and screen Resolution - qt

I need to take screenshot, get the current screen resolution, and the list of supported resolutions. Currently I am having System Specific Wrappers on these three, Is there any cross platform light weight library that can do the same ? I also need mouse/keyboard Event Abstraction That I am doing by Qt's Event now. is there any even better option for that too ?

In Qt you have QDesktopWidget to access desktop information (available size, screen geometry). To grab sreenshot check Qt's screenshot example

Related

Recommended way for using GStreamer with Qt and QML?

Because of display up to 4 UDP/RTP streams in different modes (single / dual / quad) I first decided to use GStreamer. It works but it is not easy to handle and I can not switch between viewing modes during runtime. To solve that issue I want to use Qt (5.12.4) with QML.
I read a lot about the integration of GStreamer in Qt (QGStreamer, QMediaPlayer), different GStreamer plugins (qmlglsink) and so on. At the end of the day I always end by the QMediaPlayer which integrates since Qt 5.12.x a gst-pipeline element.
I realized a Qt-QML application that show 4 UDP/RTP streams as a kind of preview and when I choose one of this previews it changes to full screen mode. A further tap on the full screen image changes back to preview mode.
BUT the performance is not really satisfied. Either one ore two previews are frozen and when I tap them the full screen is working or the preview is running and the full screen is frozen.
This leads me to the questions:
Is there a performance issue with my embedded device? -> I will check that soon. I can exclude a bandwith problem because only GStreamer works.
Is MediaPlayer with gst-pipeline the right way?
Are there other solutions with more performance using Qt with QML?
Thanks.

Camera overlay with flex mobile

I would like if it possible to have a mask overlay over the camera using flex mobile framework. I need to develop a cross platform (android/iOS) application using camera on which I want to display buildings. So I know it is possible with native iOS and android code. But I would like to do it with flex mobile.
Do you know if it only possible or not ?
Thansk a lot.
Best regards
Using Adobe Air's camera class, you cannot manipulate the picture this way.
You can change quality, sizing, frame rate etc., but cannot manipulate the image so it will show additional data except data received from the device.

masking QT widget while capturing the screen

I have a Qt 4.8 application for both Win and Mac that captures the screen.
I have a QT widget on my desktop (always on top) that shouldn't be captured during my capture. Instead of the QT widget, the application/desktop running behind the QWidget should be captured. My QT application's UI should be masked from capturing.
Is there any way i can do this?
The main question is: are you in control of taking the screenshot or not? If you're taking the screenshot, it'd be doable but platform specific. You'd need to get the contents of all of the windows on the screen except the one you don't want to see, and build up a screenshot from those.
If it's a third party screen grabber, like Ctrl-PrtSc on Windows or Grab on OS-X, then you're out of luck unless the OS provides some APIs that would enable you to hide the widget.
The functionality you desire isn't exactly commonplace so I'm doubtful there's any portable, or even sane, way of achieving what you want.

Window screen capture on Adobe Flex?

Is there a way to take screenshot of the client's window using flex?
I found an example which uses java bridge, but i am looking for different solution.
Do you want to take a snapshot of the users screen? OR just of the AIR App?
If you want to take a screencap of the user's screen, I'd look into NitroScreenCap. The 'generic' approach they use is that they wrote native code for each operating system and pack it up with the AIR app using a NativProcess. I guess you could try to implement that yourself if needed.
If you just need a screencap of the Flex app; do some Googling. You can get the BitMapData of any given Flex Component and turn that into an image. Here are a few links that come up:
http://blog.flexexamples.com/2007/11/16/taking-screenshots-in-flex-using-the-imagesnapshotcaptureimage-method/
http://dougmccune.com/blog/2007/06/03/save-a-snapshot-image-of-a-flex-app-without-a-server/
http://www.mehtanirav.com/taking-a-snapshot-of-flex-app-from-flex/

Qt Accessible Widgets

I'm trying to implement accessibility for my Qt application. I'm using NVDA (http://www.nvda-project.org/) and Freedom Scientific's JAWS (http://www.freedomscientific.com/products/fs/jaws-product-page.asp) as the screen readers I want to support.
I'm assigning the widget's accessibleName and accessibleDescription properties (http://doc.trolltech.com/4.7/qwidget.html#accessibleDescription-prop) in order to get the screen reader to read this information.
Example:
saveButton->setAccessibleName("save");
saveButton->setAccessibleDescription("Save the options you have entered above");
In both screen readers everything is working correctly when using the mouse. However, when focus changes in a widget all the readers read is "pane". Why isn't Qt providing the accessibility information that I need?
You have to import a plug-in to get Qt to have accessible widgets. This lets screen readers read the names, and hierarchies of objects.
To get this, you need to add qtaccessible widgets to your qmake project file:
QTPLUGIN += qtaccessiblewidgets
And in main.cpp add a Q_IMPORT_PLUGIN
Q_IMPORT_PLUGIN(qtaccessiblewidgets)
Then screen readers will be able to accurately read:
"Button. Save. Save the options you have entered above. Press space to activate the button."
When you tab to (or otherwise place focus on) a button
in a tutorial video I saw that Qt surface components
have the properties "AccessibleName" and "AccessibleDescription".
This suggests that Qt applications are screen readable
can be developed. In the programming languages ​​are called Java and C #
the properties the same.
I am developing Python on Windows 10
Question:
Is there a guide on how to make a Python Qt application suitable for screen readers?

Resources