Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Adding QCameraViewfinder in .ui file
I have recently asked a question regarding accessing the Camera in Qt for Android Device , later I've got a zip file in Github of Camera where I have a question now that how did they add QCameraViewfinder in .ui file I'll mention the image below.
Please check out this image where you can find on the right-hand side they have used QCameraViewfinder. Where this is my problem where i cant use it. So any suggestions please????
And my Qt version is 5.10
Where this is my problem where i cant use it
What do you mean? Why can't you use it?
Maybe they added it manually editing the ui file which is simply XML.
@jsulm good point as adding it manually but i dont think so ui file is editable??
@Vineela Why shouldn't it be editable this way? I'm only not sure what will happen if you load it in QtDesigner.
Pablo J. Rogina last edited by Pablo J. Rogina
@Vineela from the screenshot you posted, I assume it's the Camera example from Qt's examples.
how did they add QCameraViewfinder in .ui file
They've used the Promote Widgets feature from Qt Designer.
You can read more from the documentation, but essentially you add a Widget from the list (section Containers), right click and select Promote to... and then type the name of the class (custom widget) you want to use, see here .
@Pablo-J.-Rogina Thank you so much that worked
Pablo J. Rogina last edited by
@Vineela Great. Please don't forget to mark your post as solved.
@Pablo-J.-Rogina Yes i did it thank you much once again.