Hey there!
I'm Midnight, aka Riccardo, I'm n00b, new and italian, so don't expect much from me. I've 14 years and I've started "programming" with Python about two weeks ago, and I need help.
I followed some simple tutorial, and I realized come very simple programs too, like a Password Requester and a Contact Rubric.
Now, I'm using IDLE as IDE, and all my programs are just text. Now I'm tryin' to make them look better with Qt Designer and, well, I can design the form, and obtein the relative XML file. But how do I do to convert that XML file into python code? Thank you in advance.
Python Visual Interface
Started by Midnight, Apr 16 2008 12:17 PM
6 replies to this topic
#1
Posted 16 April 2008 - 12:17 PM
|
|
|
#2
Posted 16 April 2008 - 08:52 PM
Well, I don't have any experience with Qt, but I'm pretty sure you don't need to convert the XML file you've got into Python code. You'll have to use some of Qt's functionality to load the XML file, and receive the design of the program. I don't know how to do this, as I've no experience with Qt, but you could check the documentation. And of course, you shall make sure you've installed Qt's libraries for Python.
Edit:
If you just want simple graphical user interfaces, you should check out Tkinter. It ships with Python, so you won't have to install third-party libraries. You can find lots of tutorial on it, and Python has a big official documentation for it. I think you should check it, and see if it fits your requirements.
Edit:
If you just want simple graphical user interfaces, you should check out Tkinter. It ships with Python, so you won't have to install third-party libraries. You can find lots of tutorial on it, and Python has a big official documentation for it. I think you should check it, and see if it fits your requirements.
Edited by v0id, 17 April 2008 - 03:38 AM.
#3
Posted 17 April 2008 - 06:36 AM
Well, for Qt probably ur right, but now I need to know what is the function to convert the XML. Maybe this phantomatic pyuic that I don't know what is???
For TKinter, I don't know because of its old fashoned graphic... There is a thing like Qt Designer, but for Tkinter?
For TKinter, I don't know because of its old fashoned graphic... There is a thing like Qt Designer, but for Tkinter?
#4
Posted 17 April 2008 - 06:52 AM
I found this using a single search on Google:
PyQT Tutorial
I think it's what you need. In the bottom you can see the three example files, and how everything is loaded together.
Good luck!
PyQT Tutorial
I think it's what you need. In the bottom you can see the three example files, and how everything is loaded together.
Good luck!
#5
Posted 17 April 2008 - 10:21 AM
Thanks a lot... But I think I have another problem: when I type import qt in my python shell, I get an error message. Is it normal??
Edited by Midnight, 18 April 2008 - 02:14 AM.
#6
Posted 18 April 2008 - 01:49 AM
Edited
Edited by Midnight, 18 April 2008 - 02:13 AM.
#7
Posted 18 April 2008 - 09:56 PM
Well, I guess you haven't installed PyQt properly.
You can get PyQt from the official website here:
Riverbank : PyQt : Overview
Or, if you're using a Debian-based Linux distribution, do like this:
$ sudo apt-get install python-qt4 python-qt4-dev python-qt4-doc pyqt4-dev-tools
You can get PyQt from the official website here:
Riverbank : PyQt : Overview
Or, if you're using a Debian-based Linux distribution, do like this:
$ sudo apt-get install python-qt4 python-qt4-dev python-qt4-doc pyqt4-dev-tools


Sign In
Create Account

Back to top









