Results 1 to 1 of 1

Thread: QWebPluginFactory::create issue with QNetworkAccessManager

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

    Question QWebPluginFactory::create issue with QNetworkAccessManager

    I’m trying to implement plugins in QWebView.

    The problem is that pages that use sessions/cookie/POST method to display a file (such as PDF or SWF in my case) do not receive this information.

    How do I send sessions/cookie/POST method in QWebPluginFactory::create ?

    Qt Code:
    1. QObject *PluginsFactory::create(const QString &mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const
    2. {
    3. if (mimeType == "application/pdf") {
    4. QAxWidget *pdfWidget = new QAxWidget;
    5. if(!pdfWidget->setControl("{ca8a9780-280d-11cf-a24d-444553540000}")){
    6. qDebug() << "Please install Adobe Acrobat Reader (R) for Pdf support!";
    7. pdfWidget->clear();
    8. } else {
    9. pdfWidget->setProperty("src", url.url());
    10. return pdfWidget;
    11. }
    12. }
    13.  
    14. if (mimeType == "application/swf") {
    15. QAxWidget *flash = new QAxWidget;
    16. flash->resize(740, 580);
    17. if(!flash->setControl("{d27cdb6e-ae6d-11cf-96b8-444553540000}")){
    18. qDebug() << "Adobe Flash Player (R) for SWF support!";
    19. flash->clear();
    20. } else {
    21. flash->dynamicCall("LoadMovie(long,string)", 0, url.url());
    22. return flash;
    23. }
    24. }
    25. return 0;
    26. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by brcontainer; 15th December 2013 at 23:45. Reason: updated contents

  2. The following 3 users say thank you to brcontainer for this useful post:

    ebirdseystew (18th December 2013)

Similar Threads

  1. Replies: 5
    Last Post: 30th October 2012, 09:52
  2. Replies: 1
    Last Post: 16th August 2011, 00:26
  3. Replies: 12
    Last Post: 17th June 2009, 06:34
  4. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 22:05
  5. how to save sequences of text files and sound files
    By nagpalma in forum Qt Programming
    Replies: 8
    Last Post: 3rd July 2007, 01:06

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.