matrix-gui-browser-2.0 matrix-browser Qt QWebView hacking

/*
 * matrix-browser
 *
 * Simple web viewer used by Matrix application launcher
 *
 * Copyright (C) 2011,2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are 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 following 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 may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS 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 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *  SPECIAL, EXEMPLARY, 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 WAY OUT OF THE USE
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

#include <QtGui>
#include <QWebView>
#include <QGraphicsWebView>
#include <iostream> 

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    QStringList args = app.arguments();                // 获取命令行参数

    if (args.count() != 2)                             // 判断命令行参数个数
    {
        std::cerr << "You need to pass the URL you want to view\n" << endl;
        return 1;
    }

    QWebView view;                                     // 创建一个浏览器对象
    view.load(QUrl(args[1]));                          // 第一个参数作为web url
    // the widget does not feature a context menu
    view.setContextMenuPolicy(Qt::NoContextMenu);
    view.setWindowFlags(Qt::FramelessWindowHint);      // 窗口框体隐藏
    view.showMaximized();                              // 窗口最大化
    view.show();                                       // 窗口显示

    return app.exec();

}
时间: 2024-07-31 14:34:38

matrix-gui-browser-2.0 matrix-browser Qt QWebView hacking的相关文章

C++ GUI Qt4编程(01)-1.1Hello Qt

1. 根据C++ GUI Qt4编程(第二版)整理2. 系统:centos7:  Qt版本:5.5.13. 程序:hello.cpp #include <QApplication> #include <QLabel> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel *label = new QLabel("Hello, Qt!"); label->show();

双心ping GUI工具1.0

双心ping GUI工具1.0该软件利用WindowsAPI提供了图形界面的ping程序,同时还可以调用DOS下的ping命令.ping成功后自动加入网址列表框及同目录下的列表文件Pinglist.ini.双击网址即可ping该网址. http://yunpan.cn/cw3LLw42ZJBg5  访问密码 84d9

OK335xS Qt network hacking

/********************************************************************** * OK335xS Qt network hacking * 说明: * 应该半年前尝试过来解读这个程序,但是那时候对有些东西不是很理解, * 最后不了了之了,这次因为需要,所以重新对network的mainwindow.cpp进行 * 一下解读. * * 2016-4-8 深圳 南山平山村 曾剑锋 ***************************

hdoj 3376 Matrix Again and hdoj 2686 Matrix 【最大费用最大流】

Matrix Again Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others) Total Submission(s): 3453    Accepted Submission(s): 1017 Problem Description Starvae very like play a number game in the n*n Matrix. A positive intege

【leetcode】74. Search a 2D Matrix &amp; 240. Search a 2D Matrix II

题目如下:这两个题目可以用同样的代码来解答,因此就合并在一起了. 题目一: 题目二: 解题思路:两个题目的唯一区别在于第二个题目下一行的最小值不一定会小于前一行的最大值.但是不管怎么样我们可以确定的是,如果某一行的最小值都比target要大,那么这一行之后的值都比target要大.如果target介于某一行的最小值和最大值之间,那么target有可能在这一行.至于如何判断target是否存在,因为数组有序,用二分查找即可. 代码如下: class Solution(object): def se

四则运算GUI设计2.0

使用QT设计的界面如下: 程序流程是点击开始出题,会在题目后面的框中显示所出的题目,在输入答案以后点击提交答案会判断输入的答案是否正确. 输入后的界面: 部分代码如下: qtyunsuan.h文件: class Qtyunsuan : public QMainWindow { Q_OBJECT public: Qtyunsuan(QWidget *parent = 0); ~Qtyunsuan(); private slots: int OnShowQue(); private slots: i

ubuntu安装QT4.8.0 和安装QT库

一 .源代码的获取. 官网http://qt.nokia.com/downloads (自己安装的4.8.0) 二.解压代码 tar zxvf qt-everywhere-opensource-src-4.8.0.tar.gz 解压完进入解压后的源代码文件夹 三.执行./configure生成makefile ./configure -prefix /usr/local/Qt-4.8.0 (上面指定的这个目录/usr/local/Qt-4.8.0 ,就是make install 后的安装目录)

Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside of the boundary (i.e. wrap-around is not allowed). E

leetcode_Spiral Matrix II

描述: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] 思路: 这题看起来是很复杂,做起来也确实挺复杂的.但是呢,这题并不是非常非常难,只是