原创 QMainWindow(二) QAction

QAction包含的內容有:icon, menu text, shortcut, status text, “What’s this” text, tooltip。既可以在調用constructor時創建,也可以用Set***()單獨地設

原创 Java Swing

要寫個能編輯管理"項目"和其中文件的編輯器,用到JTree,JTextArea 我嘞個去, 沒事還是不要用JTree~~   先說說java graphics通過調用drawLine(), drawString(), 來繪製。裏面的東西沒

原创 QTextEdit和QTextDocument(一)

QTextEdit簡介: 它可以顯示rich text。 這裏的rich text不是指microsoft的rich text,而是用html標籤表示的形式。 它通過viewport顯示大型文件,而且性能好,可以快速響應用戶的操作。 以p

原创 python碎碎念(一)

python對象的複製 python中的類型爲序列型或者類的變量,在傳遞的過程中都是傳引用。如何複製對象的值而不是其引用呢? 工廠方法:list() dict()等 dict: copy() 方法 , list: [:] slice

原创 Qt: Resource System

http://doc.trolltech.com/latest/resources.html qrc文件: xml格式的qrc文件,給出資源名字和磁盤上資源之間的聯繫。例如 <!DOCTYPE RCC><RCC version="1.0

原创 QTextEdit和QTextDocument(二)

QTextFrame: 組成QTextDocument的樹結構,rootframe()得到根節點。只有一系列遍歷的方法和設置格式TextFrameFormat的方法。 QTextBlock: 組成QTextDocument的列表結構。 Q

原创 python tutorial 學習筆記(六)class

class ClassName( SuperClass ) : A new name space is created, thus all assignments to local variables go into this new

原创 把一組函數整理成類

1. helper 類型的函數整理成類相比而言最好寫: helper函數互相之間通常不用共享數據. 而一組helper函數通常對相同類型的數據提供協助。即他們不共享數據值而加強了這個類型的功能。所以只要類裏主要存放一個變量,類型爲大家都協

原创 Java語法總結 - 內部類

轉載自睿狼的博客: http://www.blogjava.net/raylong1982/archive/2007/10/24/155439.html 從Java1.1開始引入了內部類以來,它就引起了人們的激烈爭論。其實任何優秀的語言

原创 Java的數據類型轉換方法

數字之間的轉換 (byte,short,char)--int--long--float—double 低級到高級, 自動轉換 但是如果是要降低精度的轉換,要加強制轉換的標記 double a; int b = (int) a;// a

原创 python tutorial 學習筆記(四) Input and Output, 字符串的轉換等

print object value in the interpreter shell: expression statment print keyword print a,b,c sys.stdout.write() stri

原创 我想搭網站(一)

摘自Wiki[Python]: Python is often used as a scripting language for web applications , e.g. via mod_wsgi for the Apache