Nominate our 2022 Qt Champions!

QVideoWidget::setBrightness doesn't have any effect

  • I am developing on mac and QT5.7.

    I am trying to do a small video playing application, but when trying to set contrast or brightness it looks like these setBrightness and setContrast doesn't have any effect to video playback whatsoever.

    Maybe I am doing something stupid? Simplified code is like this:

    MainWindow::MainWindow(QWidget *parent) :
        ui(new Ui::MainWindow)
        QVideoWidget* vw = new QVideoWidget();
    //    vw->setBrightness(100);
    //    vw->setContrast(100);

    I tried to set it back and forth from 100 to 0 to -100, but I don't see any difference.
    Is it a problem in my environment or code?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You're not doing anything stupid but I'd rather try to modify the brightness after the video has started running rather than in the constructor.

    Note that not all controls may be available on all platforms.

Log in to reply