![]() |
Some Python and Qt questions
The easiest way to make applications for the N900 is Python and Qt. I'm pretty fluent in Python and programming in general but I think PyQt for Maemo lacks something really important, tutorials and guides.
I have some questions that couldn't be answered with Wiki and Forum searching. I'm planning to make a Wiki page with all the information for a starter, from Qt designer to deb packaging with the information this thread gathers. Let's assume we are using Qt designer and a simple text editor. What size should be set to the form? (I've seen 800x400 and 800x425) How to make the compoments fill the form? How can you use pyuic4 to output a file that you can include in your main python program? How can you center (horizontal and vertical) elements? Feel free to ask your own questions. More will be added, I can't remember all the problem I faced now :o Thanks for all the answers! |
Re: Some Python and Qt questions
Use the layouts and you don't have to care about placements, screen sizes etc.
Have seen a lot projects where people are setting control positions by hand! Please never do this! :) Take a look at QVBoxLayout, QHBoxLayout etc. - they all can be used and tested in Qt Designer. All your questions could be answered when someone makes a "How to use the Qt Designer with layout" wiki entry if it doesn't already exist. |
Re: Some Python and Qt questions
Take in account that PyQt is considered a thin layer on top of QT, so if you want pyqt tutorials youll get a mix of technical questions about how to improve that layer, and not the application developing thng.
for example, points 1, 2 and 4 matters to QT and no PyQt directly, because are concepts, and belong to QT Dont consider this as a rule, its just a guide |
Re: Some Python and Qt questions
Quote:
Thanks for the comments guys, I found some information and answers to some of my questions. I'm going to make a Wiki page soon. |
Re: Some Python and Qt questions
Quote:
pyuic4 uiFile -o pythonFile For example, say in directory c:\myProjects\textEditor you had a Qt Designer file called myEdit.ui and you were developing in a Windows environment. You'd invoke the Windows Command Prompt, and type in the following: Code:
cd c:\myProjects\textEditor I sometimes use a little python program to automate this, if I have lots of *.ui files. Create the following python script Code:
import os, sys, glob Copy it into the folder with your *.ui files. From the command line, type Code:
cd c:\myProjects\textEditor |
All times are GMT. The time now is 06:29. |
vBulletin® Version 3.8.8