|
|
2010-06-16
, 14:01
|
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#12
|
|
|
2010-06-16
, 14:11
|
|
|
Posts: 1,684 |
Thanked: 1,562 times |
Joined on Jun 2008
@ Austin, TX
|
#13
|
all:
echo "Say nothing, Act casual."
src/ui/some_window.py: src/ui/src/some_window.ui
pyuic4 $< > $@
~/src.tar: clean src/ui/some_window.py
tar -cvf $@ src
ui: src/ui/some_window.py
dev: ~/src.tar
build: ~/src.tar
scp $< developer@n900:/opt/workspace/.
ssh developer@n900 "rm -rf /opt/workspace/src/"
ssh developer@n900 "cd /opt/workspace && /opt/maemo/usr/bin/gnu/tar -xvf ./src.tar && rm ./src.tar"
clean:
find . -type f -name "*.pyc" -print -exec rm -f {} \;
dist-clean: clean
rm -f src/ui/some_window.py
|
|
2010-06-16
, 14:19
|
|
Posts: 376 |
Thanked: 511 times |
Joined on Aug 2009
@ Greece
|
#14
|
might be worth listing all of the apps that are PyQt in the repos. That way you can just look at the actual real live examples here is my starter for 10.
ncalc
nclock
maesynth
maelophone
healthcheck
Lots of python gtk apps which dont get counted
|
|
2010-06-16
, 14:22
|
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#15
|
. I'll have to look into pallet().
|
|
2010-06-16
, 14:29
|
|
|
Posts: 1,684 |
Thanked: 1,562 times |
Joined on Jun 2008
@ Austin, TX
|
#16
|
Also, I suggest that you create a wiki page with this information and have this thread for discussion on that. This way everyone will be able to contribute and will be easier to find and read.
| The Following 5 Users Say Thank You to epage For This Useful Post: | ||
|
|
2010-06-16
, 14:55
|
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#17
|
http://wiki.maemo.org/PyQt_Tips_and_Tricks
def notifyMe(foo)
print foo
f = QPushButton("Click me!")
x = lambda: notifyMe("they call him tim")
self.connect(f, SIGNAL("clicked()"), x)
|
|
2010-06-16
, 15:02
|
|
Posts: 13 |
Thanked: 20 times |
Joined on Jun 2010
|
#18
|
|
|
2010-06-16
, 15:13
|
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#19
|
| The Following User Says Thank You to attila77 For This Useful Post: | ||
|
|
2010-06-16
, 15:16
|
|
|
Posts: 1,684 |
Thanked: 1,562 times |
Joined on Jun 2008
@ Austin, TX
|
#20
|
Hang on... these are two things here. Events/signals/slots across multiple threads very much exist in Qt (you do need to know what you're doing, though, and whether you're using a module/class/function that (probably due to performance reasons) requires additional synchronisation - this is very visibly displayed in the Qt docs of each class). GIL issues and blocking Python calls are a completely separate issue - threads are a special story under Python even without Qt.
I've had some unicode-relate issues when moving strings between python datatypes and Qt datatypes. Somehow, the unicode stuff would get lost. So, it's likely easiest (At least when you're new to python and Qt) to use QString and QStringList than their pure python counterparts.
If you're not bringing in data from anywhere else, this isn't that big of a deal, but if you're interacting with data from any other source, unicode is a pretty likely scenario these days.
Use Makefiles
I've been developing on both Windows and Linux. I use cygwin on Windows and have my development space mounted via samba/cifs. I use make in cygwin to perform various tasks for me.
Here's the Makefile that I use in my project directory to re-build the ui whenever I need, and tar up my directory and copy it to my n900 when need be.
Note, you need to install the gnu-tar package to reliably untar .tar files. I had a lot of issues doing so until I installed it.
all: echo "Say nothing, Act casual." ui: pyuic4 src/ui/src/some_window.ui > src/ui/some_window.py clean: find . -type f -name "*.pyc" -print -exec rm -f {} \; dev: clean tar -cvf ~/src.tar src build: clean tar -cvf ~/src.tar src scp ~/src.tar developer@n900:/opt/workspace/. ssh developer@n900 "rm -rf /opt/workspace/src/" ssh developer@n900 "cd /opt/workspace && /opt/maemo/usr/bin/gnu/tar -xvf ./src.tar && rm ./src.tar" rm ~/src.tar