Results 1 to 1 of 1

Thread: Transparent Mainwindow to show background video

  1. #1
    Join Date
    Jun 2019
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Transparent Mainwindow to show background video

    Hi,

    I am trying to play video to LCD display via display drivers and on top of that want to display Qt screens. So want to make a portion of Qt screen to be completely transparent and show the background video.

    My widget hierarchy is as MainWindow->centralwidget->videowidget.

    Tried setting stylesheet with "background:transparent;" for all three widgets and set below attributes to the mainwindow but not working.

    setWindowFlags(Qt::FramelessWindowHint);
    setAttribute(Qt::WA_NoSystemBackground, true);
    setAttribute(Qt::WA_TranslucentBackground, true);
    setAttribute(Qt::WA_TransparentForMouseEvents, true);
    setAttribute(Qt::WA_OpaquePaintEvent, false);

    videowidget is shown in green color and background video is hidden.
    Searched other forums and tried to set "QWSServer::setBackground( QBrush(Qt::transparent) );" but still no help. Only the green screen turned black and still the video is hidden.

    I am using Qt 4.8 [yeah I know its older version ].

    My question is,

    1. Whether its possible to create completely transparent Qt screens?
    2. Whether I have to use GraphicsView or Widgets for this type of use case?
    3. Any other options I have to set to make it work?

    Really appreciate for any help here. Thank you.
    Last edited by vaskuma; 5th June 2019 at 03:54.

Similar Threads

  1. Gif as Background for QListWidget or transparent background
    By gunturrohith in forum Qt Programming
    Replies: 0
    Last Post: 21st March 2016, 08:43
  2. Transparent image over video
    By vladozar in forum Qt Programming
    Replies: 1
    Last Post: 18th September 2015, 20:22
  3. Replies: 2
    Last Post: 27th April 2015, 12:36
  4. Replies: 4
    Last Post: 27th November 2013, 16:15
  5. Transparent background on QLabel on transparent QWidget
    By codeslicer in forum Qt Programming
    Replies: 1
    Last Post: 13th February 2008, 03:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.