禁断の広告法だったことが判明。開発中止。
Révision | f327dd7950d63c2785270faf368b580dcf1c960a (tree) |
---|---|
l'heure | 2011-08-16 22:01:44 |
Auteur | 池田 大樹 <h_ikeda@iked...> |
Commiter | 池田 大樹 |
広告表示が可能となった。あとは位置の調整。
@@ -1,15 +0,0 @@ | ||
1 | -<html> | |
2 | -<body> | |
3 | -<script type="text/javascript"><!-- | |
4 | -google_ad_client = "ca-pub-3600741293730423"; | |
5 | -/* スプラッシュ広告 */ | |
6 | -google_ad_slot = "8694222147"; | |
7 | -google_ad_width = 336; | |
8 | -google_ad_height = 280; | |
9 | -//--> | |
10 | -</script> | |
11 | -<script type="text/javascript" | |
12 | -src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> | |
13 | -</script> | |
14 | -</body> | |
15 | -</html> |
@@ -1,5 +0,0 @@ | ||
1 | -<RCC> | |
2 | - <qresource prefix="/"> | |
3 | - <file>Ads.html</file> | |
4 | - </qresource> | |
5 | -</RCC> |
@@ -15,8 +15,6 @@ SOURCES += main.cpp | ||
15 | 15 | |
16 | 16 | HEADERS += |
17 | 17 | |
18 | -RESOURCES += \ | |
19 | - HTML.qrc | |
18 | +RESOURCES += | |
20 | 19 | |
21 | -OTHER_FILES += \ | |
22 | - Ads.html | |
20 | +OTHER_FILES += |
@@ -1,26 +1,18 @@ | ||
1 | 1 | #include <QApplication> |
2 | -#include <QStyle> | |
3 | 2 | #include <QtWebKit/QWebView> |
4 | 3 | #include <QTimer> |
5 | -#include <QMessageBox> | |
6 | 4 | |
7 | 5 | int main(int argc, char *argv[]) |
8 | 6 | { |
9 | 7 | QApplication a(argc, argv); |
10 | 8 | |
11 | - QWebSettings* webSettings = QWebSettings::globalSettings(); | |
12 | - webSettings->setAttribute( QWebSettings::JavascriptEnabled, true ); | |
13 | - webSettings->setAttribute(QWebSettings::PluginsEnabled,true); | |
14 | - | |
15 | 9 | QWebView *window= new QWebView; |
16 | 10 | window->setWindowFlags(Qt::FramelessWindowHint); |
17 | 11 | window->setFixedSize(336,280); |
18 | - window->move(150,150); | |
19 | - window->setHtml(QObject::tr("<html><body><a href=\"http://\">test</a><script type=\"text/javascript\"><!--\ngoogle_ad_client = \"ca-pub-3600741293730423\";\n/* スプラッシュ広告 */\ngoogle_ad_slot = \"8694222147\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n//-->\n</script><script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script></body></html>")); | |
20 | -QMessageBox::information(window,QObject::tr("test"),QObject::tr("<html><body><a href=\"http://\">test</a><script type=\"text/javascript\"><!--\ngoogle_ad_client = \"ca-pub-3600741293730423\";\n/* スプラッシュ広告 */\ngoogle_ad_slot = \"8694222147\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n//-->\n</script><script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script></body></html>")); | |
12 | + window->setHtml(QObject::tr("<html><body style=\"background-color:black;margin:0px;padding:0px;\"><script type=\"text/javascript\"><!--\ngoogle_ad_client = \"ca-pub-3600741293730423\";\n/* スプラッシュ広告 */\ngoogle_ad_slot = \"8694222147\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n//-->\n</script><script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script></body></html>"),QUrl("http://www.1-stop.co.cc/")); | |
21 | 13 | window->show(); |
22 | 14 | |
23 | - QTimer::singleShot(10000,window,SLOT(close())); | |
15 | + QTimer::singleShot(30000,window,SLOT(close())); | |
24 | 16 | |
25 | 17 | return a.exec(); |
26 | 18 | } |