connect(sender, SIGNAL(signal), receiver, SLOT(slot));
Sender and receiver are pointers to "QObject"s and where signal and slot are function signatures without parameter names. The SIGNAL() and SLOT() macros essentially convert their argument to a string.
One signal can be connected to many slots. Many signals can be connected to the same slot. A signal can be connected to another signal.
2009年5月12日 星期二
2009年4月24日 星期五
Backup Ubuntu的方法
Backing up:
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
2009年3月30日 星期一
2009年3月19日 星期四
在Python中使用relative path的好處
我們可以改用相對路徑的方式來指定:
#!/usr/bin/env python
於是會以 /usr/bin/env 程式來叫用 python 直譯器,處理 Python 程式檔案。這麼作的好處是當系統中安裝有許多個不同的 Python 直譯器時,會採用路徑在最前面的那一個。如此一來,若使用者另外安裝了一版 Python (例如裝在自己的家目錄),又把自己的 Python 放到路徑設定 (PATH 環境變數) 的最前面,即會採用使用者自己安裝的 Python。
2009年3月12日 星期四
Updating the locate database in Mac OS X
安裝或更新了Mac OSX的系統以後, 使用locate指令經常會出現下面的error message:
`/var/db/locate.database': No such file or directory
執行database的建立, 就可以解決這個問題:sudo /usr/libexec/locate.updatedb
訂閱:
文章 (Atom)