PDA

View Full Version : Implementing a simple text editor in PyQT4 using a menu bar



jaybstory
9th January 2010, 06:09
Hello,

I'm new to pyqt4 and qt4 designer and I have few questions:

1. How do you create a user interface by writing code and using qt4 designer?

2. I'm wondering if anyone knows how to implement this tutorial:


http://www.rkblog.rk.edu.pl/w/p/simple-text-editor-pyqt4/


using a menu bar instead of buttons? For example: having the open file, save, and close buttons implemented into a menu bar having a file option with three selections (open file, save, close)? And have these options work?

(check out the attachment for an example of what I am talking about)

Thank you in advance.

jaybstory
11th January 2010, 07:08
I figured out my first question. Basically Qt4 creates a .ui file. When you use the compiling command pyuic4 filename.ui > filename.py it will create a .py file in which you can edit your code. This way you can use the designer and write your own code. Still looking for an answer for my second question though