开发者

use qt and django to create desktop apps

I had this idea of creating desktop apps using django. The principe being: - Write the django app, and use something like cherrypy to serve it. - Write a Qt app in C++ to access it and this by using QtWebview (webkit)

I'd like to "bundle" this in a single app. The lighter, the better :)

So here are my questions and if you have better ideas and suggestions, please share them :)

  • Is it possible to开发者_JS百科 serve a django app with a c++ one? (a c++ server embedding python)?
  • anyone did this before? Do you have some articles, blog posts?

Thanks a lot!


Django has it's own server. Why involve CherryPy?

You're creating a hellaciously complex architecture for no recognizable purpose. Your comments are almost impossible to parse in the context of your question. Please consider rewriting the question to address your actual concerns with an actual thing you actually wrote.

"I ... used pywxiwdgets in the past and it was SLOW"

There are many of desktop frameworks. Use another one.

Don't introduce Django -- it's for web applications, not desktop applications. The overhead of messing with Django and CherryPy is silly.

Find the original reason for SLOW. I'll bet it was database slowness from using SQLite. If not that, I'll bet it was a poor data model. If not that I'll be it was poor use of the pywxwidgets. If not that, I'll bet your desktop app made internet connections that were slow. Indeed, I'd bet that almost any part of your app was the culprit and making a super-complex architecture will not make things faster, just more complex.

Until you identify -- and measure -- the original cause for slowness, you're not actually solving the actual problem you actually had.


Look at http://www.python-camelot.com/

It says "A python GUI framework on top of Sqlalchemy and PyQt, inspired by the Django admin interface."


Pyjamas Desktop can probably be integrated with Django. And there's no need for C++. It currently uses pywebkitgtk, but I don't think there's any real reason why it couldn't use PyQt4 instead with a bit of work.


Use PyQt or PySide instead of C++.


you can use electron-api-demos this opensource and Now this technology is considered the bright generation, so one of the most famous people who used it is YouTube and Visual Studio Code https://github.com/electron/electron-api-demos

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜