Python 的 GUI 开发框架 htmlPy

码农软件 · 软件分类 · GUI开发框架 · 2019-08-07 18:59:44

软件介绍

htmlPy 是对 PySide 的 QtWebKit 库的 Python 封装。可以用 HTML5 和 CSS3 来开发漂亮的图形界面应用程序。基于 Qt 构建,具备高度可定制以及跨平台支持。兼容 Python2 和 Python3.可用于任何 Python 库和环境,如 django, flask, scipy, virtualenv 等。也可以使用前端框架,如 bootstrap, jQuery, jQuery UI 等。

一个 htmlPy 基本应用包含如下三个组件:

后端:back_end.py

import htmlPy


class BackEnd(htmlPy.Object):

    def __init__(self, app):
        super(BackEnd, self).__init__()
        self.app = app

    @htmlPy.Slot()
    def say_hello_world(self):
        self.app.html = u"Hello, world"

GUI: main.py

import htmlPy
from back_end import BackEnd

app = htmlPy.AppGUI(
    title=u"Sample application")
app.maximized = True
app.template_path = "."
app.bind(BackEnd(app))

app.template = ("index.html", {})

if __name__ == "__main__":
    app.start()

前端:index.html

<html>
  <body>
    <a
    href="BackEnd.say_hello_world"
    data-bind="true">
      Click to say "Hello, world"
    </a>
  </body>
</html>

本文地址:https://codercto.com/soft/d/11864.html

C语言编程:一本全面的C语言入门教程(第三版)

C语言编程:一本全面的C语言入门教程(第三版)

(美)Stephen Kochan / 张小潘 / 电子社博文视点资讯有限公司 / 2006年 / 59.00元

本书是极负盛名的C语言入门经典教材,其第一版发行至今已有20年的历史。本书内容详实全面,由浅入深,示例丰富,并在每个章节后面附有部分习题,非常适合读者自学使用。除此之外,《C语言编程》一书对于C语言标准的最新进展、C语言常见开发工具以及管理C语言大型项目等重要方面,也进行了深入浅出的说明。一起来看看 《C语言编程:一本全面的C语言入门教程(第三版)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具