Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QVideoWidget::setBrightness doesn't have any effect
Forum Update on Tuesday, May 27th 2025

QVideoWidget::setBrightness doesn't have any effect

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 803 Views 1 Watching
  • 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 Offline
    T Offline
    timppajee
    wrote on last edited by
    #1

    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
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved