跨平台GUI开发 [英] Cross-platform GUI development

查看:65
本文介绍了跨平台GUI开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用Python编程了5年或更长时间,每当我想要一个快速脏的GUI时,我就会使用Tkinter。这部分是因为它是我学到的第一个工具包,但也因为它是标准的b / b
Python发行版的一部分,因此很容易获得Python应用程序工作

跨平台 - 它通常几乎不需要移植工作。


然而,当我需要更多的咕噜声时,我倾向于转向Tix ,

,我认为这也是相当标准的。然而,本周,我在Linux下编写了

a Tix应用程序,我真的很想在Mac OS上工作

并且它被证明相当痛苦。去。

中没有标准fink或apt存储库的Tix,当我下载tar-ball时,

它不会构建因为它有很多未满足的依赖项。然后我就读了一个帖子,上面写着只有Tkinter / Python人才真正使用Tix

了,tcl / tk的人很久以前就转移到了更好的工具包上。


我的问题是,如果Tix是旧帽子,我应该使用哪些GUI工具包*

用于快速n-dirty跨平台GUI开发?我猜

这与切线相关:

http://groups.google.com/group/comp....ed0d40ffd0b1c0


我希望这不是一个愚蠢的问题。我穿着阻燃内衣。


彼得

解决方案

10月12日上午10点13分,psaff ... @ googlemail.com

< psaff ... @ googlemail.comwrote:


我已经用Python编程了5年或更长时间,每当我想要一个快速脏的GUI时,我就会使用Tkinter。这部分是因为它是我学到的第一个工具包,但也因为它是标准的b / b
Python发行版的一部分,因此很容易获得Python应用程序工作

跨平台 - 它通常几乎不需要移植工作。


然而,当我需要更多的咕噜声时,我倾向于转向Tix ,

,我认为这也是相当标准的。然而,本周,我在Linux下编写了

a Tix应用程序,我真的很想在Mac OS上工作

并且它被证明相当痛苦。去。

中没有标准fink或apt存储库的Tix,当我下载tar-ball时,

它不会构建因为它有很多未满足的依赖项。然后我就读了一个帖子,上面写着只有Tkinter / Python人才真正使用Tix

了,tcl / tk的人很久以前就转移到了更好的工具包上。


我的问题是,如果Tix是旧帽子,我应该使用哪些GUI工具包*

用于快速n-dirty跨平台GUI开发?我猜

这与切线相关:

http://groups.google.com/group/comp....thread/thread/ ...


我希望这不是一个愚蠢的问题。我穿着阻燃剂

内衣。


Peter



Personnaly,我用PyQt只是因为我喜欢Qt到Gtk,所以桌面比Gtk更加集成了。

实际上,你的应用程序在Mac,Win或Linux上的Qt看起来比如一个

原生应用。


只是一个感觉的问题我认为;因为大多数GUI

框架都提供相同的功能。


Alexandre Badez< al ***** ********@gmail.com写道:


10月12日上午10点13分,psaff ... @ googlemail.com

< psaff ... @ googlemail.comwrote:


我的问题是如果Tix是旧帽子,那么什么是GUI工具包我*应该*

用于快速n-dirty跨平台GUI开发?我猜

这与切线相关:

http://groups.google.com/group/comp....thread/thread/ ...

<另外,我使用PyQt只是因为我优先考虑Qt到Gtk,所以桌面比Gtk更加集成了。

实际上,您在Mac,Win或Linux上的Qt应用程序看起来像一个

原生应用程序。



我建议wxPython超过那些因为


1)所有平台上的原生外观

2)非商业应用程序(QT)不需要昂贵的许可证

3)安装在Windows(GTK)上是不是很痛苦

>
那说,自从我上次看了

以来,时间变化和1-3可能已经改变了!


-

Nick Craig-Wood< ni ** @ craig-wood.com-- http://www.craig-wood.com/nick


2007年10月12日星期五10:13:29 +0200, ps ****** @ googlemail.com

< ps ****** @ googlemail.com写的:


我已经用Python编程了5年或更长时间,每当我想要一个快速的n
-dirty GUI,我使用Tkinter。这部分是因为它是我学到的第一个工具包,但也因为它是标准的b / b
Python发行版的一部分,因此很容易获得Python应用程序工作

跨平台 - 它通常几乎不需要移植工作。


然而,当我需要更多的咕噜声时,我倾向于转向Tix ,

,我认为这也是相当标准的。然而,本周,我在Linux下编写了

a Tix应用程序,我真的很想在Mac OS上工作

并且它被证明相当痛苦。去。

中没有标准fink或apt存储库的Tix,当我下载tar-ball时,

它不会构建因为它有很多未满足的依赖项。然后我就读了一个帖子,上面写着只有Tkinter / Python人才真正使用Tix

了,tcl / tk的人很久以前就转移到了更好的工具包上。


我的问题是,如果Tix是旧帽子,我应该使用哪些GUI工具包*

用于快速n-dirty跨平台GUI开发?



因为你已经习惯了Tkinter,我会说:等一下...... tcl / tk 8.5是

在路上它将带来许多新的和期待已久的小部件,在大多数平台上都带有原生外观。请参见:
http://wiki.tcl.tk/14796

和这里的外观:
http:/ /tktable.sf.net/tile/


请注意,这些小部件已经有Tkinter包装器,但它们可能不是
那些将最终进入官方发行的人。如果你想要玩它们,你可以在这里找到它们:
https://sourceforge.net/project/show...roup_id=165637

(下载tkinter-wrappers)


如果你想使用它们,你当然也需要最新的测试版

tcl / tk 8.5,可以从这里下载:
http://www.tcl.tk/software/tcltk/8.5.html


我希望这不是一个愚蠢的问题。我穿着阻燃剂b
内衣。



你在这里不需要这些...... ;-)


HTH

-

python -c" print''''。join([chr(154 - ord(c))for c in

''U (17zX(%,5.zmz5(17l8(%,5.Z *(93-965


I''ve been programming in Python for 5 or more years now and whenever I
want a quick-n-dirty GUI, I use Tkinter. This is partly because it''s
the first toolkit I learnt, but also because it''s part of the standard
Python distribution and therefore easy to get Python apps to work
cross platform - it usually requires almost no porting effort.

However, when I need a little bit more grunt, I tend to turn to Tix,
which I thought was also fairly standard. However, this week, I wrote
a Tix application under Linux which I''d really like to work on Mac OS
and it''s proving fairly painful to get it going. There is no Tix in
the standard fink or apt repositories and when I download a tar-ball,
it wouldn''t build because it had a lot of unmet dependencies. I then
read a post which said that only Tkinter/Python people really use Tix
anymore and people in tcl/tk moved onto better toolkits long ago.

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development? I guess
this is tangentially related to:

http://groups.google.com/group/comp....ed0d40ffd0b1c0

I hope this isn''t a stupid question. I''m wearing flame retardant
underwear.

Peter

解决方案

On Oct 12, 10:13 am, "psaff...@googlemail.com"
<psaff...@googlemail.comwrote:

I''ve been programming in Python for 5 or more years now and whenever I
want a quick-n-dirty GUI, I use Tkinter. This is partly because it''s
the first toolkit I learnt, but also because it''s part of the standard
Python distribution and therefore easy to get Python apps to work
cross platform - it usually requires almost no porting effort.

However, when I need a little bit more grunt, I tend to turn to Tix,
which I thought was also fairly standard. However, this week, I wrote
a Tix application under Linux which I''d really like to work on Mac OS
and it''s proving fairly painful to get it going. There is no Tix in
the standard fink or apt repositories and when I download a tar-ball,
it wouldn''t build because it had a lot of unmet dependencies. I then
read a post which said that only Tkinter/Python people really use Tix
anymore and people in tcl/tk moved onto better toolkits long ago.

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development? I guess
this is tangentially related to:

http://groups.google.com/group/comp....thread/thread/...

I hope this isn''t a stupid question. I''m wearing flame retardant
underwear.

Peter

Personnaly, I use PyQt simply because I prefere Qt to Gtk, witch is
much more integrated with all desktop than Gtk.
In fact, your application in Qt on Mac, Win or Linux look like a
native app.

Just a question of "feeling" I think; because most of those GUI
framework, offer quiet the same functionality.


Alexandre Badez <al*************@gmail.comwrote:

On Oct 12, 10:13 am, "psaff...@googlemail.com"
<psaff...@googlemail.comwrote:

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development? I guess
this is tangentially related to:

http://groups.google.com/group/comp....thread/thread/...


Personnaly, I use PyQt simply because I prefere Qt to Gtk, witch is
much more integrated with all desktop than Gtk.
In fact, your application in Qt on Mac, Win or Linux look like a
native app.

I''d recommend wxPython over those becase

1) native look and feel on all platforms
2) doesn''t require expensive licensing for non-commercial apps (QT)
3) Isn''t a pain to install on windows (GTK)

That said, times change and 1-3 may have changed since I last looked
at it!

--
Nick Craig-Wood <ni**@craig-wood.com-- http://www.craig-wood.com/nick


On Fri, 12 Oct 2007 10:13:29 +0200, ps******@googlemail.com
<ps******@googlemail.comwrote:

I''ve been programming in Python for 5 or more years now and whenever I
want a quick-n-dirty GUI, I use Tkinter. This is partly because it''s
the first toolkit I learnt, but also because it''s part of the standard
Python distribution and therefore easy to get Python apps to work
cross platform - it usually requires almost no porting effort.

However, when I need a little bit more grunt, I tend to turn to Tix,
which I thought was also fairly standard. However, this week, I wrote
a Tix application under Linux which I''d really like to work on Mac OS
and it''s proving fairly painful to get it going. There is no Tix in
the standard fink or apt repositories and when I download a tar-ball,
it wouldn''t build because it had a lot of unmet dependencies. I then
read a post which said that only Tkinter/Python people really use Tix
anymore and people in tcl/tk moved onto better toolkits long ago.

My question is if Tix is old hat, what is the GUI toolkit I *should*
be using for quick-n-dirty cross platform GUI development?

Since you''re already used to Tkinter, I''d say: just wait... tcl/tk 8.5 is
on the way and it will bring a lot of new and long-awaited widgets, along
with native look on most platforms. See here:
http://wiki.tcl.tk/14796
and here for the look:
http://tktable.sf.net/tile/

Note that there are already Tkinter wrappers for these widgets, but they
may not be the ones that''ll end up in the official distribution. If you
want to play with them, you can find them here:
https://sourceforge.net/project/show...roup_id=165637
(download tkinter-wrappers)

If you want to use these, you''ll of course also need the latest beta of
tcl/tk 8.5, downloadable from here:
http://www.tcl.tk/software/tcltk/8.5.html

I hope this isn''t a stupid question. I''m wearing flame retardant
underwear.

You won''t need these much around here... ;-)

HTH
--
python -c "print ''''.join([chr(154 - ord(c)) for c in
''U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965


这篇关于跨平台GUI开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆