Results 1 to 7 of 7

Thread: QtWebEngine display black block when I called QWidget::winId() for displaying video

  1. #1
    Join Date
    Feb 2016
    Posts
    15
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default QtWebEngine display black block when I called QWidget::winId() for displaying video

    Hi Everyone,

    Iam new to Qt. Iam displaying a video as well as a webpage by using qtwebengine on the same mainwindow. But QtWebEngine display black block when I called QWidget::winId().

    Iam using winId() for displaying my video on a widget. But it is affecting my webpage. i dont know why its happening. Iam getting the correct winid for displaying the video on a widget and iam able to display video. but webpage

    is blocked by black screen.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QtWebEngine display black block when I called QWidget::winId() for displaying vid

    Can you be more specific?
    Which widget are you getting te windId() for?
    Where is this widget relative to the web view? Parent, sibling?

    Cheers,
    _

  3. #3
    Join Date
    Feb 2016
    Posts
    15
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QtWebEngine display black block when I called QWidget::winId() for displaying vid

    Hi,
    In the following example you can observe the black block if you run the code. In the same way iam also getting problem when i display video by using its corresponding winId(). its is affecting webengine by displaying black block on it..


    When i searched in the net i found QtQTBUG-48130

    Calling winId() on a widget breaks QOpenGLWidget/QQuickWidget/QWebEngineView in the same TLW.

    QtWebEngine display black block when I called QWidget::winId().

    for more information on the bug please visit following link. They said they fixed the bug in 5.6.0 RC

    https://bugreports.qt.io/browse/QTBUG-48130

    But how to install 5.6.0 RC now.. i dont see it in online installer.. if you provide me information about how to install 5.6.0 RC that will be helpful to me..

    Qt Code:
    1. #include "mainwindow.h"
    2. #include "ui_mainwindow.h"
    3. #include <QPushButton>
    4. #include <QWebEngineView>
    5. #include <QWidget>
    6. #include <QtCore/QDebug>
    7. //#include <qDebug>
    8. MainWindow::MainWindow(QWidget *parent) :
    9. QMainWindow(parent),
    10. ui(new Ui::MainWindow)
    11. {
    12. ui->setupUi(this);
    13. #if 1
    14. ui->gridLayout->addWidget(btn);
    15. qDebug()<<btn->winId();
    16. #endif
    17. QWebEngineView *web = new QWebEngineView;
    18. ui->gtridLayout->addWidget(web);
    19. web->load(QUrl("http://www.google.com"));
    20. }
    21.  
    22. MainWindow::~MainWindow()
    23. {
    24. delete ui;
    25. }
    To copy to clipboard, switch view to plain text mode 

    Thanks,,
    Last edited by anda_skoa; 12th March 2016 at 11:37. Reason: missing [code] tags

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QtWebEngine display black block when I called QWidget::winId() for displaying vid

    Quote Originally Posted by swarupa View Post
    But how to install 5.6.0 RC now.. i dont see it in online installer.. if you provide me information about how to install 5.6.0 RC that will be helpful to me..
    http://download.qt.io/development_re.../5.6/5.6.0-rc/

    Cheers,
    _

  5. #5
    Join Date
    Feb 2016
    Posts
    15
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QtWebEngine display black block when I called QWidget::winId() for displaying vid

    Hi,
    I have already downloaded qt-opensource-linux-x64-5.6.0-rc.run file. But it is a 64 bit file. i need 32 bit file because iam using 32 bit ubuntu with 14.04 version. But i dont find 32 bit file in that link. so please if you know how to download 32 bit file let me know.

    Thanks,

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QtWebEngine display black block when I called QWidget::winId() for displaying vid

    Then you will either have to build it yourself or wait for the 5.6 release next week.

    Cheers,
    _

  7. #7
    Join Date
    Feb 2016
    Posts
    15
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QtWebEngine display black block when I called QWidget::winId() for displaying vid

    Hi all ,

    when will qt release 5.6 version for 32-bit ubuntu OS? Already final release on march 16th is over. Does any one have idea on this release. please let me know if any one knows it.

    Thanks

Similar Threads

  1. [Qtwebengine] Running Chrome Apps in QtWebEngine
    By raunvivek in forum General Discussion
    Replies: 0
    Last Post: 9th July 2015, 13:32
  2. QWidget::winId() can not get the right window handle
    By ponponfish in forum Qt Programming
    Replies: 2
    Last Post: 17th May 2011, 06:45
  3. Replies: 16
    Last Post: 15th March 2010, 11:22
  4. Displaying Text on Black and White Screen
    By Stobie in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 8th December 2009, 01:03
  5. Problem with the QWidget::winId() method
    By yellowmat in forum Qt Programming
    Replies: 5
    Last Post: 22nd April 2008, 12:15

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.