Flipping the live feed using QCamera



  • I have the Qlabel widget(object name = label_2) on the mainwindow. I display the live feed from camera on this widget. Everything is working fine. However i am wondering how can i change the orientation of live feed (say i want to flip it by 90°).

        QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
    foreach (const QCameraInfo &cameraInfo, cameras)
    {
        if (cameraInfo.deviceName() == "@device:pnp:\\\\?\\pci#ven_109e&dev_036e&subsys_00000000&rev_11#5&12a6b002&0&000008#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\global")
            cM2 = new QCamera(cameraInfo, this);
    }
    cV2 = new QCameraViewfinder(this);
    cM2->setViewfinder(cV2);
    cBox2 = new QVBoxLayout();
    cBox2->addWidget(cV2);
    ui->label_2->setLayout(cBox2);
    cM2->start();


  • @sulabh
    Have you taken a look into the docu yet?

    QCameraViewfinder

    Search for "rotation"



  • @J.Hilk HIii. yes i have gone through the class it does not support any kind of rotation or transformation


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.