Discussion:
[Interest] Problems with QCamera/QML Camera when trying to porting a desktop application to android tablet
Roman Wüger >
2018-07-31 15:18:30 UTC
Permalink
Hello guys,

I try to port a desktop application to an android tablet. At the moment everthing seems to work smoothly except the camera stuff.
Previously QCamera with QCamerViewfinder was used but does not work on android, because I read that Qt Multimedia isn’t available on android and so I rewrote the entire camera stuff with QML.

A smaller application with only one dialog for demonstration works well. But since the desktop application is multi hierarchical with dialogs,
I whether does not see a video or in the second case the dialog in which the camera stuff is implemented is not shown.
This depends on whether I use QQuickView in combination with QWidget::createWindowContainer or QQuickWidget.

I saw the following entries, but the solutions are not working for me:
https://bugreports.qt.io/browse/QTBUG-49328
https://bugreports.qt.io/browse/QTBUG-41467
https://bugreports.qt.io/browse/QTBUG-39454

I tried Qt 5.9.5 to Qt 5.11.1 on an Samsung Galaxy Tab A (2016) with Android 7.0

I hope someone can help me with the problem.

Thanks in advance

Best Regards
Roman
Roman Wüger
2018-08-09 11:05:01 UTC
Permalink
Ok it seems to work with Qt 5.11.1 but the preview video is shown in the top left corner instead of the complete widget.

Any hints?

Thanks in advance
Post by Roman Wüger >
Hello guys,
I try to port a desktop application to an android tablet. At the moment everthing seems to work smoothly except the camera stuff.
Previously QCamera with QCamerViewfinder was used but does not work on android, because I read that Qt Multimedia isn’t available on android and so I rewrote the entire camera stuff with QML.
A smaller application with only one dialog for demonstration works well. But since the desktop application is multi hierarchical with dialogs,
I whether does not see a video or in the second case the dialog in which the camera stuff is implemented is not shown.
This depends on whether I use QQuickView in combination with QWidget::createWindowContainer or QQuickWidget.
https://bugreports.qt.io/browse/QTBUG-49328
https://bugreports.qt.io/browse/QTBUG-41467
https://bugreports.qt.io/browse/QTBUG-39454
I tried Qt 5.9.5 to Qt 5.11.1 on an Samsung Galaxy Tab A (2016) with Android 7.0
I hope someone can help me with the problem.
Thanks in advance
Best Regards
Roman
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Roman Wüger
2018-08-20 12:15:20 UTC
Permalink
No one?
Post by Roman Wüger
Ok it seems to work with Qt 5.11.1 but the preview video is shown in the top left corner instead of the complete widget.
Any hints?
Thanks in advance
Post by Roman Wüger >
Hello guys,
I try to port a desktop application to an android tablet. At the moment everthing seems to work smoothly except the camera stuff.
Previously QCamera with QCamerViewfinder was used but does not work on android, because I read that Qt Multimedia isn’t available on android and so I rewrote the entire camera stuff with QML.
A smaller application with only one dialog for demonstration works well. But since the desktop application is multi hierarchical with dialogs,
I whether does not see a video or in the second case the dialog in which the camera stuff is implemented is not shown.
This depends on whether I use QQuickView in combination with QWidget::createWindowContainer or QQuickWidget.
https://bugreports.qt.io/browse/QTBUG-49328
https://bugreports.qt.io/browse/QTBUG-41467
https://bugreports.qt.io/browse/QTBUG-39454
I tried Qt 5.9.5 to Qt 5.11.1 on an Samsung Galaxy Tab A (2016) with Android 7.0
I hope someone can help me with the problem.
Thanks in advance
Best Regards
Roman
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Jason H
2018-08-20 16:24:14 UTC
Permalink
_______________________________________________
Interest mailing list
***@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
Roman Wüger
2018-08-22 08:28:27 UTC
Permalink
Hi Jason,

my problem is that the QML VideoOutput and the QQuickView is not stretched. See attached image



The black background is the QWindow from QWidget::createWindowContainer. The blue background is the QQuickView. And the shown video is only a bottom right edge of the complete video.

I expected that the video fills the complete black are too

Regards
Roman
I use QML and Camera and have had no problem going between android, ios and desktop. But I'm not using widgets.
Sent: Monday, August 20, 2018 at 7:15 AM
Subject: Re: [Interest] Problems with QCamera/QML Camera when trying to porting a desktop application to android tablet
No one?
Ok it seems to work with Qt 5.11.1 but the preview video is shown in the top left corner instead of the complete widget.
Any hints?
Thanks in advance
Hello guys,
I try to port a desktop application to an android tablet. At the moment everthing seems to work smoothly except the camera stuff.
Previously QCamera with QCamerViewfinder was used but does not work on android, because I read that Qt Multimedia isn’t available on android and so I rewrote the entire camera stuff with QML.
A smaller application with only one dialog for demonstration works well. But since the desktop application is multi hierarchical with dialogs,
I whether does not see a video or in the second case the dialog in which the camera stuff is implemented is not shown.
This depends on whether I use QQuickView in combination with QWidget::createWindowContainer or QQuickWidget.
https://bugreports.qt.io/browse/QTBUG-49328
https://bugreports.qt.io/browse/QTBUG-41467
https://bugreports.qt.io/browse/QTBUG-39454
I tried Qt 5.9.5 to Qt 5.11.1 on an Samsung Galaxy Tab A (2016) with Android 7.0
I hope someone can help me with the problem.
Thanks in advance
Best Regards
Roman
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
René Hansen
2018-08-22 08:46:54 UTC
Permalink
Hey Roman,


It's hard to see what's wrong without more code.

I've attached a minimal example of how I'd start out a QML based Camera
app, with a full-window preview.

Seems to work the way you intend.


/René
Post by Roman Wüger
Hi Jason,
my problem is that the QML VideoOutput and the QQuickView is not
stretched. See attached image
[image: image1.jpeg]
The black background is the QWindow from QWidget::createWindowContainer.
The blue background is the QQuickView. And the shown video is only a bottom
right edge of the complete video.
I expected that the video fills the complete black are too
Regards
Roman
I use QML and Camera and have had no problem going between android, ios
and desktop. But I'm not using widgets.
*Sent:* Monday, August 20, 2018 at 7:15 AM
*Subject:* Re: [Interest] Problems with QCamera/QML Camera when trying to
porting a desktop application to android tablet
No one?
Ok it seems to work with Qt 5.11.1 but the preview video is shown in the
top left corner instead of the complete widget.
Any hints?
Thanks in advance
Hello guys,
I try to port a desktop application to an android tablet. At the moment
everthing seems to work smoothly except the camera stuff.
Previously QCamera with QCamerViewfinder was used but does not work on
android, because I read that Qt Multimedia isn’t available on android and
so I rewrote the entire camera stuff with QML.
A smaller application with only one dialog for demonstration works well.
But since the desktop application is multi hierarchical with dialogs,
I whether does not see a video or in the second case the dialog in which
the camera stuff is implemented is not shown.
This depends on whether I use QQuickView in combination with
QWidget::createWindowContainer or QQuickWidget.
https://bugreports.qt.io/browse/QTBUG-49328
https://bugreports.qt.io/browse/QTBUG-41467
https://bugreports.qt.io/browse/QTBUG-39454
I tried Qt 5.9.5 to Qt 5.11.1 on an Samsung Galaxy Tab A (2016) with Android 7.0
I hope someone can help me with the problem.
Thanks in advance
Best Regards
Roman
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________ Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Tony Rietwyk
2018-08-22 09:45:40 UTC
Permalink
Hi Roman,

Why did you need to use createWindowContainer? Wouldn't the QQuickView
do as a window anyway?  Have you added a layout to manage sizing the
QQuickView within the created window?

Are you using resizeMode SizeRootObjectToView?  I think the paragraph in
QQuickView documentation starting 'QQuickView also manages the sizing
...' is incorrect, whereas the description in the enum
QQuickView::ResizeMode makes more sense.

Hope that helps!

Tony
Roman Wüger
2018-09-11 21:47:36 UTC
Permalink
Hi tony,

Sorry for the delayed answer, but I was on vacation.
The same dialog works a expected on Windows and on Linux. So I think it must something be to do with android

Regards
Roman
Post by Tony Rietwyk
Hi Roman,
Why did you need to use createWindowContainer? Wouldn't the QQuickView do as a window anyway? Have you added a layout to manage sizing the QQuickView within the created window?
Are you using resizeMode SizeRootObjectToView? I think the paragraph in QQuickView documentation starting 'QQuickView also manages the sizing ...' is incorrect, whereas the description in the enum QQuickView::ResizeMode makes more sense.
Hope that helps!
Tony
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Roman Wüger
2018-11-14 06:36:07 UTC
Permalink
Hello everyone,

I tried it also with the last 5.12 Version without any positive changes. Does anyone else have an idea?

Regards
Post by Roman Wüger
Hi tony,
Sorry for the delayed answer, but I was on vacation.
The same dialog works a expected on Windows and on Linux. So I think it must something be to do with android
Regards
Roman
Post by Tony Rietwyk
Hi Roman,
Why did you need to use createWindowContainer? Wouldn't the QQuickView do as a window anyway? Have you added a layout to manage sizing the QQuickView within the created window?
Are you using resizeMode SizeRootObjectToView? I think the paragraph in QQuickView documentation starting 'QQuickView also manages the sizing ...' is incorrect, whereas the description in the enum QQuickView::ResizeMode makes more sense.
Hope that helps!
Tony
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Loading...