Results 1 to 6 of 6

Thread: QOpenGLWidget inside a QDockWidget not updated when QDockWidget::setFloating(true)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2014
    Posts
    26
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QOpenGLWidget inside a QDockWidget not updated when QDockWidget::setFloating(true

    I accidently found a solution,

    It looks like adding the code snippet below anywhere in my code fixes the problem:

    Qt Code:
    1. #include <QWebEngineView>
    2.  
    3. class QT_WebView : public QWebEngineView
    4. {
    5. Q_OBJECT
    6. public:
    7. QT_WebView(QWidget *in_parent = NULL) : QWebEngineView(in_parent) {}
    8. };
    To copy to clipboard, switch view to plain text mode 

    No need to mentioned that this is as hocus pocus as it gets and the hack is quite a huge dependency to add in a project. I'm still digging and hopping to find an more elegant fix.

    It seems the bug has to do with OpenGL context sharing and I try quite a few combinations without any good outcome so far.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,233
    Thanks
    303
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QOpenGLWidget inside a QDockWidget not updated when QDockWidget::setFloating(true

    Oh, man, this is complete voodoo. You don't even need an instance of the class, you just need to define it? What if you don't define the class, but just declare an instance of QWebEngineView in main() but never show() it? Or simply include the QWebEngineView header file in main()?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Feb 2014
    Posts
    26
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QOpenGLWidget inside a QDockWidget not updated when QDockWidget::setFloating(true

    This is good voodoo stuff indeed!

    You don't even need an instance of the class, you just need to define it?
    That is correct.

    What if you don't define the class, but just declare an instance of QWebEngineView in main() but never show() it?
    Declaring an instance of QWebEngineView to the main() do work:

    QWebEngineView l_QWebEngineView;

    Or simply include the QWebEngineView header file in main()?
    Good call but nope.

Similar Threads

  1. Issue placing a QOpenGLWidget in a QDockWidget
    By sandytf in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2015, 14:11
  2. QDockWidget inside QDockWidget
    By mqt in forum Qt Programming
    Replies: 3
    Last Post: 1st July 2013, 12:57
  3. Replies: 1
    Last Post: 7th December 2010, 21:46
  4. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  5. Default size of a QListWidget inside a QDockWidget
    By rakuco in forum Qt Programming
    Replies: 0
    Last Post: 25th July 2007, 08:01

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.