Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ QtWebKit不显示css/xsl_C++_Xml_Stylesheet_Xslt_Qwebkit - Fatal编程技术网

C++ QtWebKit不显示css/xsl

C++ QtWebKit不显示css/xsl,c++,xml,stylesheet,xslt,qwebkit,C++,Xml,Stylesheet,Xslt,Qwebkit,我无法让qtwebkit显示css/xsl。我已经尝试过这两种方法,它们都可以在web浏览器中使用,但不能在qtwebkit中使用。我是否需要启用一个设置来应用样式表,或者这是qtwebkit的失败 EDIT:Qt 4.7中禁用了XSLT支持(http://gitorious.org/webkit/qtwebkit/commit/8961d12) XML 在浏览器中查看URL时,css看起来很好。。。但不在webkit中?@jonnyclusplus:“我不能让qtwebkit显示css/xsl

我无法让qtwebkit显示css/xsl。我已经尝试过这两种方法,它们都可以在web浏览器中使用,但不能在qtwebkit中使用。我是否需要启用一个设置来应用样式表,或者这是qtwebkit的失败

EDIT:Qt 4.7中禁用了XSLT支持(http://gitorious.org/webkit/qtwebkit/commit/8961d12)

XML


在浏览器中查看URL时,css看起来很好。。。但不在webkit中?

@jonnyclusplus:“我不能让qtwebkit显示css/xsl”是什么意思?这不是在尊重你的
xml样式表
PI吗?@Alejandro:文本显示在webkit中,而不是样式表中。在webrower中,它是一个表格,在webkit中有颜色和格式,纯文本。。。只需一行xml中的所有数据…@jonnyclusplus:您需要发布reduce输入示例、完整的样式表和所需的输出,以便回答。我如何标记此已回答。。。我回答了我自己的问题@Jonnyclusplus:只是不要回答这个问题,而是用它自己的答案。
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="status.xsl"?>
    <hk>
    <item><name>Some Parameter</name><value>value</value></item>
    <item><name>Test Count</name><value>38</value></item>
    </hk>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="*|/">
    <html><head>
    <meta http-equiv="refresh" content="1"></meta></head>
    <body> <h2>Status</h2>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th>Parameter</th>
    <th>Value</th>
    </tr>
    <xsl:for-each select="hk/item"> <tr>
    <td><xsl:value-of select="name"/></td>
    <td><xsl:value-of select="value"/></td>
    </tr> </xsl:for-each> </table>

    </body> </html> </xsl:template> </xsl:stylesheet>
     webView->settings()->setUserStyleSheetUrl(QUrl::fromLocalFile("file.css"));
     webView->load(QUrl("http://192.x.x.x:port/file.xml));