Created
August 24, 2012 14:26
-
-
Save Yimgo/3451212 to your computer and use it in GitHub Desktop.
QtWebkit + Swiffy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Swiffy output</title> | |
<script src="https://www.gstatic.com/swiffy/v4.7/runtime.js"></script> | |
<script> | |
swiffyobject = {"tags":[{"type":9,"actions":[{"type":7}]},{"bounds":[{"ymin":-689,"ymax":689,"xmin":-689,"xmax":689}],"id":1,"fillstyles":[{"color":[-26368],"type":1},{"color":[-1],"type":1}],"paths":[{"fill":0,"data":["Mqqqqqqqqzmqqqqqqqqz:89f::85B2T87D2T2T87D2T85B:87D2t2T2t2T87d:85b2t87d2t2t87d2t85b:87d2T2t2T2t87D56C33C8m9m8m33c:4s8M33c9M8m33C8m4S:33C8M8M9M8M33C:4S8m33C9m8M33c8M4s:33c8m"]},{"fill":1,"data":["Mqqqqqqqqz:71d::4S8M33C9M8M33C8M4S:33C8m8M9m8M33c:4s8m33c9m8m33c8m4s:33c8M8m9M8m33C"]},{"fill":0,"data":["Mlllhllhlllllqlqlhlhlllllllvllz:70cRAAIKBBAAA92D22CA7BFXnBcGva43f:mgvbdikxmzEa92d22CaaAaAaAiKaAbEbGLBGBE"]}],"type":1},{"tags":[{"id":1,"matrix":0,"type":3,"depth":2},{"type":2}],"id":2,"frameCount":1,"type":7},{"id":2,"name":"bt_play","matrix":"::::499e999c","type":3,"actions":[{"events":2048,"actions":[{"value":2,"type":305},{"value":1,"type":305},{"value":"_parent","type":305},{"type":28},{"value":"gotoAndStop","type":305},{"type":82},{"type":23}],"key":0}],"depth":1},{"type":2},{"type":4,"depth":1},{"id":3,"bold":true,"glyphs":[{"unicode":" ","data":":"},{"unicode":"E","data":"Mvhvhvhvhvhvhz:640l:70x190H990c360g70x360G250c910g80x870J660N150k"},{"unicode":"K","data":"Mvllhllhlvhvhz:490d:430d00x50x030d880F830c820E950h520e710e980C980E510F510f960B660N960b"},{"unicode":"O","data":"Mqqqqqqqqqqzmqqqqqqqqz:820b40q30s90S200e90S230c:160e00t30s10t30s560e:580c40S590e50S10t190E10t90Q:160C80E30J30D90R20M70H90H70M10T70F20O70F760C:500C30s500E40v380i20k60l950b60l30r:940b40L00k40L00k760C:50Y30K830C40K70L910B70L70Q:920B80l50K90l50K780c:30y20k780c"},{"unicode":"e","data":"Mqqqhqqqqqqqqlqzmqqqqhz:940f20v50D60C10K60C70I:20P90f50F00g80F50s040g0f230c10M790d70M70o740C70o10U:490C00O80M90N80M130D:10V50j660C30m10R100d10R50q:920b00h60k10h00q50w800B70d0W00H80F60K360C000dJ50k90e20r00f70f20o70f60h:60n40F00f30F30f50R200D"},{"unicode":"m","data":"Mhvqqqqqqvhvqqqqqvhvqqqqqqqqvhvz:60l:810b160e:30o0w90u0v60f40g10j20e50c70k50c40e:60h0V10c0V60d70F0o50D0o00T820E810b100e:00o0w90u0w00g50g60j20e60c10k60c10h:00l00F90b60D90b40T070F810b790f:20o90B00v00D20i10L90m10H80d80S80d20I:30Q20D10H20D10O70L80D50h30L70l50G20d70Q20d20S:310C90P50n90Y620J"},{"unicode":"n","data":"Mqqqqqvhvhvqqqqqqvhvz:130k600f:30l0O90r0P60f50E80k00D20e70K50h70G40c00Q40c10U:500C00R60o10Z620J810b810d:80q0v40x0u60f90g60j80e00d10m00d70e:80i80B00d80B80e90G0r00E0r20V420E810b600f"},{"unicode":"t","data":"Mvlvhvhvqqqqqlqqqlvhvhz:420d620j750c820B40P10U90L40V90l630D:90N0i80S0k90F00d00K80b00D90h60F10f0Y70m0Y40l:20v20d0X80u40G70B30K70B80B:70D0n0T0n0Y50c0F20o280d20s40v20S"},{"unicode":"v","data":"Mlhlllllhlhz:920f:220d620j890B20T420E00C00I90B10I80E10r00T420e950B280d620J30y"},{"unicode":" ","data":":"}],"name":"Arial Bold","emSquareSize":20480,"type":5},{"bounds":{"ymin":29,"ymax":385,"xmin":29,"xmax":3118},"id":4,"matrix":"::::::","records":[{"bold":true,"text":"Evenement OK","height":400,"color":-13421773,"font":3,"y":360,"x":":7z2v3v5x3v56c2v5x4m1k11c"}],"type":6},{"id":4,"matrix":"::::259d635c","type":3,"depth":1},{"type":2}],"v":"4.7.0","backgroundColor":-1,"frameSize":{"ymin":0,"ymax":8000,"xmin":0,"xmax":11000},"frameCount":2,"frameRate":24,"code":"","version":9}; | |
</script> | |
<style>html, body {width: 100%; height: 100%;}</style> | |
</head> | |
<body style="margin: 0; overflow: hidden; "> | |
<div id="swiffycontainer" style="width: 550px; height: 400px;"></div> | |
<script> | |
var stage = new swiffy.Stage(document.getElementById('swiffycontainer'), swiffyobject); | |
stage.start(); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QApplication> | |
#include <QGraphicsWebView> | |
#include <QGraphicsScene> | |
#include <QGraphicsView> | |
#include <QDebug> | |
int main(int argc, char *argv[]) | |
{ | |
QApplication a(argc, argv); | |
QGraphicsScene graphicsScene; | |
QGraphicsView graphicsView(&graphicsScene); | |
QGraphicsWebView webView; | |
webView.load(QUrl("html5_test.html")); | |
graphicsScene.addItem(&webView); | |
graphicsView.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); | |
graphicsView.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); | |
graphicsView.resize(500,400); | |
qDebug() << QTWEBKIT_VERSION_STR; | |
graphicsView.show(); | |
return a.exec(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QT += core gui webkit | |
TARGET = swiffy_qtwebkit | |
TEMPLATE = app | |
CONFIG += debug | |
SOURCES += main.cpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment