Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QVideoWidget::setBrightness doesn't have any effect

    General and Desktop
    2
    2
    635
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      timppajee last edited by

      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) :
          QWidget(parent),
          ui(new Ui::MainWindow)
      {
          QVideoWidget* vw = new QVideoWidget();
      
          inputPlayer->setVideoOutput(vw);
          inputPlayer->setMedia(QUrl::fromLocalFile("video.mp4"));
      
          vw->setBrightness(-100);
      //    vw->setBrightness(100);
          vw->setContrast(-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?

      1 Reply Last reply Reply Quote 1
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post