Results 1 to 3 of 3

Thread: Load a html file: No name 'QtWebEngineWidgets' in module 'PyQt5'

  1. #1
    Join Date
    Apr 2019
    Posts
    13
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Load a html file: No name 'QtWebEngineWidgets' in module 'PyQt5'

    Hi,
    I'm trying to load a html file inside a windows but I'm not able to import 'QtWebEngineWidgets' .

    I'm using Fedora 29 and I've installed by pip the PQt5 version 5.11.3.

    I'm not sure what should I do. Someone suggest to downgrade the PyQt5 version, but I'm sure there should be a smart and more efficient way.

    Any suggestion?
    The code is really simple:
    Qt Code:
    1. web = QWebEngineView()
    2. web.load(QUrl("file:///tmp/diff2HtmlCompare-master/index.html"))
    3. web.show()
    To copy to clipboard, switch view to plain text mode 
    Thanks,
    M

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

    Default Re: Load a html file: No name 'QtWebEngineWidgets' in module 'PyQt5'

    Maybe it is packaged as a separate module/package?

    When I run "pip search" here on my system I can see a package called "PyQtWebEngine"
    Maybe you need that one as well.

    Alternatively you could try installing the respective packages of your Linux distribution.

    Or go for the official Qt for Python bindings https://doc.qt.io/qtforpython/

    Cheers,
    _

  3. #3
    Join Date
    Apr 2019
    Posts
    13
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Load a html file: No name 'QtWebEngineWidgets' in module 'PyQt5'

    Quote Originally Posted by anda_skoa View Post
    Maybe it is packaged as a separate module/package?

    When I run "pip search" here on my system I can see a package called "PyQtWebEngine"
    Maybe you need that one as well.

    Alternatively you could try installing the respective packages of your Linux distribution.

    Or go for the official Qt for Python bindings https://doc.qt.io/qtforpython/

    Cheers,
    _
    I had to use "pip3 install" instead of "pip install".

    Thanks
    M

Similar Threads

  1. Replies: 2
    Last Post: 30th August 2018, 01:26
  2. Replies: 0
    Last Post: 26th July 2015, 04:45
  3. QLibrary::load: The specified module could not be found
    By mentalmushroom in forum Qt Programming
    Replies: 5
    Last Post: 13th November 2013, 16:32
  4. QtOpenGL Module - load mesh into QGLWidget
    By fp13 in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2012, 16:52
  5. Best way to load and parse an HTML file ??
    By tuthmosis in forum Qt Programming
    Replies: 8
    Last Post: 23rd August 2008, 11:06

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.