0

对于那部分,我不了解 qml、qt 或 c++。但我的问题是我有这个 .lex 文件,它实际上只是 xml,还有一些以 .qml 结尾的文件,比如这个 frontpagetemplate.qml。

这里的格式我也不知道。

<qt title="{book_name}">

<h1>{book_name}</h1>
<br/>


<!-- BEGIN paragraph_tpl -->

  <!-- BEGIN paragraph_html_tpl -->
  {html}
  <!-- END paragraph_html_tpl -->

  <!-- BEGIN paragraph_header_tpl -->
  <h2>{header}</h2>
  <!-- END paragraph_header_tpl -->

  <!-- BEGIN paragraph_text_tpl -->
  <p>{text}</p>
  <!-- END paragraph_text_tpl -->

  <!-- BEGIN paragraph_link_tpl -->
  <p><a href="{link_href}">{link_name}</a></p>
  <!-- END paragraph_link_tpl -->

  <!-- BEGIN paragraph_olist_tpl -->
  <ol type="{list_type}">
    <!-- BEGIN olist_item_tpl -->
    <li>{text}</li>
    <!-- END olist_item_tpl -->
  </ol>
  <!-- END paragraph_olist_tpl -->

  <!-- BEGIN paragraph_ulist_tpl -->
  <ul type="{list_type}">
    <!-- BEGIN ulist_item_tpl -->
    <li>{text}</li>
    <!-- END ulist_item_tpl -->
  </ul>
  <!-- END paragraph_ulist_tpl -->

  <!-- BEGIN paragraph_table_tpl -->
  <table {bgcolor} {width} border="{border}" cellspacing="{cellspacing}" cellpadding="{cellpadding}">
    <!-- BEGIN table_tr_tpl -->
    <tr {bgcolor}>
      <!-- BEGIN tr_th_tpl -->
      <th {bgcolor} {width} colspan="{colspan}" rowspan="{rowspan}" align="{align}">{text}</th>
      <!-- END tr_th_tpl -->

      <!-- BEGIN tr_td_tpl -->
      <td {bgcolor} {width} colspan="{colspan}" rowspan="{rowspan}" align="{align}">{text}</td>
      <!-- END tr_td_tpl -->
    </tr>
    <!-- END table_tr_tpl -->
  </table>
  <!-- END paragraph_table_tpl -->

  <!-- BEGIN paragraph_image_tpl -->
  <p><img src="{img_src}" /></p>
  <!-- END paragraph_image_tpl -->

<!-- END paragraph_tpl -->

<table border>
  <tr>
    <th align="left">ID</th>
    <td>{book_id}</td>
  </tr>
  <tr>
    <th align="left">Created</th>
    <td>{created}</td>
  </tr>
  <tr>
    <th align="left">Last modified</th>
    <td>{modified}</td>
  </tr>
  <tr>
    <th align="left">Publisher ID</th>
    <td>{publisher_id}</td>
  </tr>
  <tr>
    <th align="left">Publisher</th>
    <td>{publisher_name}</td>
  </tr>
</table><br/>


</qt>

这是什么语法,那里有编辑器吗?我可以将其转换为html吗?

我真的很难找到有关此的任何信息。我发现的关于 qml 的所有内容,都是看起来像 JavaScript 变体的东西。

我的目标是合并这些文件,并对 .lex 文件中的标签和数据进行 html 表示,而不是现在看起来丑陋的 lexion。

4

1 回答 1

0

您发布的文件绝对是 html 的变体。希望其他人能立即认出它是它所属的任何套件。也许它是富文本,也许是其他格式——但替换qthtml,您会在网络浏览器中看到它被标记。

QML 是一种使用 JavaScript 样式语法构建应用程序的语言。在我看来,和它一起工作很有趣。您可以在以下位置下载 IDE:

http://qt-project.org/

我的猜测是您正在查看一个 Qt Quick 应用程序,我冒险猜测 Qt4,但我是该工具包的新手,所以我的知识相当现代。

于 2014-02-28T15:38:02.047 回答