Results 1 to 6 of 6

Thread: How to use qwebkitplatformplugin?

  1. #1
    Join Date
    Apr 2013
    Posts
    65
    Thanks
    4
    Thanked 3 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question How to use qwebkitplatformplugin?

    how to use qwebkitplatformplugin in a QWebView?

    I have the following code:

    Qt Code:
    1. #include <QWebKitPlatformPlugin>
    2.  
    3. MainWindow::MainWindow(QWidget *parent, bool new) :
    4. QMainWindow(parent),
    5. ui(new Ui::MainWindow)
    6. {
    7. ui->setupUi(this);
    8.  
    9. webView = new QWebView;
    10. ui->webViewLay->addWidget(webView);
    11. webView->setHtml("<p>test</p>");
    12. }
    To copy to clipboard, switch view to plain text mode 

    but found no example of how to use extensions.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to use qwebkitplatformplugin?

    What are you trying to achieve?

  3. #3
    Join Date
    Apr 2013
    Posts
    65
    Thanks
    4
    Thanked 3 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to use qwebkitplatformplugin?

    I want to use the class QWebSpellChecker which is inside QWebKitPlatformPlugin, can you help me?

    Class:
    Qt Code:
    1. class QWebKitPlatformPlugin {
    2. public:
    3. virtual ~QWebKitPlatformPlugin() {}
    4.  
    5. enum Extension {
    6. MultipleSelections,
    7. Notifications,
    8. Haptics,
    9. TouchInteraction,
    10. FullScreenVideoPlayer,
    11. SpellChecker
    12. };
    13.  
    14. virtual bool supportsExtension(Extension) const = 0;
    15. virtual QObject* createExtension(Extension) const = 0;
    16. };
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Apr 2013
    Posts
    65
    Thanks
    4
    Thanked 3 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to use qwebkitplatformplugin?

    could anyone give a help?

  5. #5
    Join Date
    Jan 2011
    Posts
    18
    Thanks
    6
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to use qwebkitplatformplugin?

    see this for a reference implementation.

  6. #6
    Join Date
    Apr 2013
    Posts
    65
    Thanks
    4
    Thanked 3 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to use qwebkitplatformplugin?

    Thanks @raven-worx

    Sounds good, but I have a difficulty when compiling in windows, could you help me?

    I am newbie to QT, What folder should I put hunspell (Windows)?

    I tried adding the main folder of the project, tried to add the folder "src", but both cause the following error:
    error: cannot find -lhunspell
    I tried doing this:
    LIBS += -LC:/Users/cr/Desktop/QT/qtwebkit-plugins-master/src/hunspell
    but this error occurs:
    C:\Users\cr\Desktop\QT\qtwebkit-plugins-master\src\spellcheck\speller.cpp:57: error: undefined reference to Hunspell::Hunspell(char const*, char const*, char const*)'

    see all errors that occur in the following image:

    3.png

    Note: Usin hunspell-1.3.2

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.