[Qt-interest] QtWebKit plugin issues
Peter
pgeorges at gmail.com
Tue Oct 27 07:27:54 CET 2009
I just tried that test (reconfigured it only very slightly to get through
the proxy) and I get no flash.. I have copied libflashplayer.so to
~/.mozilla/plugins (and just for reference, flash does work on firefox).
I am currently testing in linux (Centos 5.2, kernel 2.6.18-92) running
Qt4.5.2. I can try this later on snow leopard (without the need for the
proxy) where i am running Qt4.6.0beta1.
Is it related to the proxy?
#include <QtGui/QApplication>
#include <QtWebKit/QWebView>
#include <QtNetwork/QNetworkProxy>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QNetworkProxy proxy(QNetworkProxy::HttpProxy, QString("x"), 8080,
QString("x"), QString("x"));
QNetworkProxy::setApplicationProxy(proxy);
QWebView webView;
webView.settings()->setAttribute(QWebSettings::PluginsEnabled,true);
webView.setUrl(QUrl::fromEncoded("
http://www.adobe.com/software/flash/about/"));
webView.show();
return app.exec();
}
Cheers,
Peter.
On Tue, Oct 27, 2009 at 4:42 PM, Paul Colby <qt at colby.id.au> wrote:
> Hi Peter,
>
> Below is the code for a really simple QtWebKit app I wrote as a test
> case. It works fine in OSX and Windows, and should work fine in Linux
> too. Why not give it a go... that way, you can reasonably determine
> if the problem is in your Qt code vs your Qt / Flash installation.
>
> #include <QApplication>
> #include <QWebView>
>
> int main(int argc, char *argv[]) {
> QApplication app(argc, argv);
> QWebView webView;
> webView.settings()->setAttribute(QWebSettings::PluginsEnabled,true);
> webView.setUrl(QUrl::fromEncoded("
> http://www.adobe.com/software/flash/about/"));
> webView.show();
> return app.exec();
> }
>
> Hope that helps narrow it down for you - even if only a little.
>
> BTW, the Flash plugin crashes QtWebKit for Windows in Qt 4.6.1 beta 1
> (https://bugs.webkit.org/show_bug.cgi?id=30375) just in case you were
> thinking about trying that out :|
>
> paul.
>
> On Tue, Oct 27, 2009 at 4:26 PM, Peter <pgeorges at gmail.com> wrote:
> > Anyone? There is no information other than "set
> QWebSettings::PluginsEnabled
> > to true" to get flash working... why does it not work for me?
> >
> > On Sat, Oct 24, 2009 at 1:26 AM, Peter Georges <pgeorges at gmail.com>
> wrote:
> >>
> >> It does not work in 4.5 for me either in linux
> >>
> >> On 23/10/2009, at 7:38 PM, Andrew Stuart wrote:
> >>
> >> Flash is broken in 4.6 under Windows.
> >> as
> >> On 23/10/2009, at 7:19 PM, Peter wrote:
> >> I have a few issues with QtWebKit under both osx 10.6 (using Qt
> 4.6.0beta1
> >> w/cocoa) and linux (using Qt 4.5.2). Firstly, I cannot get flash working
> at
> >> all (I use youtube as a test). I set the globalSettings() correct as
> >> follows:
> >>
> >>
> >>
> QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled,
> >> true);
> >>
> >>
> QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptEnabled,
> >> true);
> >>
> >> then when I load the page I confirm that plugins and javascript are both
> >> enabled:
> >>
> >> std::cout << "plugins enabled: " <<
> >> webView->page()->settings()->testAttribute(QWebSettings::PluginsEnabled)
> <<
> >> std::endl;
> >> std::cout << "javascript enabled: " <<
> >>
> webView->page()->settings()->testAttribute(QWebSettings::JavascriptEnabled)
> >> << std::endl;
> >> webView->load(QUrl(url));
> >>
> >> prints out:
> >>
> >> plugins enabled: 1
> >> javascript enabled: 1
> >>
> >> I have flash10 installed on both linux and osx in the correct
> directories,
> >> but it just tells me that I have no flash browser installed or my
> javascript
> >> is not enabled...
> >>
> >> What am I doing wrong?
> >>
> >> Report this message as spam
> >>
> >> _______________________________________________
> >> Qt-interest mailing list
> >> Qt-interest at trolltech.com
> >> http://lists.trolltech.com/mailman/listinfo/qt-interest
> >>
> >> _______________________________________________
> >> Qt-interest mailing list
> >> Qt-interest at trolltech.com
> >> http://lists.trolltech.com/mailman/listinfo/qt-interest
> >>
> >
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> >
>
>
>
> --
> http://colby.id.au
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091027/797de171/attachment.html
More information about the Qt-interest-old
mailing list