/** Matrix-browser * * Simple Web Viewer used by Matrix Application Launcher * * Copyright (C) 2011,2012 Texas Instrume NTS Incorporated-http://www.ti.com/ * * * redistribution and use in source and binary forms, with or without * modification, is permitted provided tha t the following conditions * is met: * * redistributions of source code must retain the above copyright * Notice , this list of conditions and the following disclaimer. * * redistributions in binary form must reproduce the above copyright * Notice, this list of conditions and the foll Owing disclaimer in the * documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * Its contributors is used to endorse or Promote products derived * from this software without specific prior written permission. * * This software are provided by the COPYRIGHT holders and CONTRIBUTORS * ' as is ' and any EXPRESS OR implied warranties , including, but not * LIMITED to, the implied warranties of merchantability and FITNESS for * A particular PURPOSE is Disclaimed. In NO EVENT shall the COPYRIGHT * OWNER OR CONTRIBUTORS is liable for any DIRECT, INDIRECT, incidental, * special, EX Emplary, or consequential damages (including, but not * LIMITED to, procurement of substitute GOODS OR SERVICES; LOSS of Use, * DATA, OR profits; or business interruption) however caused and on any * theory of liability, WHETHER in contract, STRICT liability, OR TORT * (including negligence OR OTHERWISE) arising in any-out-of-the----the-software, even IF advised of the PO Ssibility of SUCH DAMAGE. * */#include<QtGui>#include<QWebView>#include<QGraphicsWebView>#include<iostream>intMainintargcChar**argv) {qapplication app (argc, argv); Qstringlist args= App.arguments ();//get command line arguments if(Args.count ()! =2)//determine the number of command line arguments{Std::cerr<<"You need to pass the URL of want to view\n"<<Endl; return 1; } Qwebview view; //Create a Browser objectview.load (Qurl (args[1]));//The first parameter as a Web URL//The widget does not feature a context menuView.setcontextmenupolicy (Qt::nocontextmenu); View.setwindowflags (Qt::framelesswindowhint); //window frame Body Hideview.showmaximized (); //window Maximizationview.show (); //window Display returnapp.exec ();}
matrix-gui-browser-2.0 Matrix-browser Qt Qwebview hacking