Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.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
Qt QWebView中的tab键行为_Qt_Webkit_Qwebview - Fatal编程技术网

Qt QWebView中的tab键行为

Qt QWebView中的tab键行为,qt,webkit,qwebview,Qt,Webkit,Qwebview,我正在使用创建一个富文本编辑器。这个简单的页面: <html> <head> </head> <body style="white-space:pre" contenteditable="true"> test text </body> </html> 根据内置检查员的说法 按tab键时,插入以下片段: <span class="Apple-tab-span" styl

我正在使用创建一个富文本编辑器。这个简单的页面:

<html>
    <head>
    </head>
    <body style="white-space:pre" contenteditable="true">
        test text
    </body>
</html>
根据内置检查员的说法

按tab键时,插入以下片段:

<span class="Apple-tab-span" style="white-space:pre"> </span>
并呈现一个简单的空间

粘贴制表符时,将添加一个简单的空格,而不使用上面的span标记

通过使用toHtml方法保存html,我可以看到字符是tab字符。因此,问题在于如何说服QWebView正确呈现选项卡,以便将其后面的内容与下一个选项卡停止点对齐

Qt版本是4.8.3,实际上是在几个月前从主干构建的

<span class="Apple-tab-span" style="white-space:pre"> </span>