Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
C++
Qt 451 codes
Home
C++
Qt
1 A simple example that shows how selections can be used directly on a model
2 A simple model that uses a QStringList as its data source
3 A single model can be shared between multiple views
4 A Slot Responds to a Signal
5 Add a label and display
6 Add buttons to Vertical Box Layout Panel
7 Add clicked event for push button
8 Add image to text format
9 Add int to QList
10 Add slider to window
11 Add to QMultiMap
12 Add to QSet
13 Add user-defined class to QMap
14 Add value change signal for slider
15 Add value change signal for Spin box
16 Adding animation with QTimeLine
17 Adding children node to Tree View
18 Adding HTML based tooltip
19 Adding image to QLabel
20 Adding image to tooltip
21 Adding menu to window
22 Adding one item to QListWidget
23 Adding QStringList to QListWidget
24 Adding resource to QTextDocument
25 All standard dialog
26 Analog Clock
27 Append and insert into QList
28 Append child to QDomElement
29 Backward copy
30 Basic drawing
31 Basic layout
32 Binary Search in Sorted Containers
33 Button based calculator
34 Calculate the average and sum for QTableWidget
35 Calculator with push buttons
36 Calendar widget
37 Character painter widget
38 Check event type
39 Check file existance and file name with QFile
40 Check image format and scan line
41 Check image format support
42 Child widget
43 Circle Widget
44 Circle Widget with paint
45 Class wizard dialog
46 Clock label
47 Cloning QListWidgetItem
48 Code editor
49 Color dialog demo
50 Color list editor
51 Combo widget mapper
52 Complete demo for QString
53 Complete demo for QStringList
54 Config dialog
55 Connect to MySql with QSqlDatabase, and do select, update, insert and delete
56 Connect to Sqlite and do insert, delete, update and select
57 Copying Container Areas
58 Cpp with qobject
59 Cpp with qstring
60 Create a Label and show
61 Create brush
62 Create color from RGB value
63 Create DOM document with QDomDocument
64 Create file with QFile
65 Create int QStack
66 Create pixmal with QPixmap, save to png file
67 Create PushButton and add to window
68 Create QBuffer from QByteArray
69 Create QByteArray from array
70 Create QDataStream from QBuffer
71 Create QFile from file path
72 Create QFont
73 Create screen shot
74 Create stream from file
75 Create text node
76 Create xml element and insert to DOM tree
77 Creates a 3x3 table
78 Creates two containers and compares all the elements for equality
79 Custom style
80 Data mapper
81 Delete all elements in a QList
82 Digital clock
83 Display translated message on QMessageBox
84 Docking widget
85 Download from URL
86 Download manager
87 Drag and drop
88 Drag and drop text
89 Drag Drop List Model
90 Draw in QLinearGradient
91 Draw in QRadialGradient
92 Draw line
93 Draw lines
94 Draw polylines
95 Draw QTextDocument with QTextDocument
96 Draw rectangle
97 Draw round rectangle
98 Draw text
99 Draws a filled-in circle
100 Drop action
101 Drop event
102 Drop rectangle
103 Dynamic layout
104 Event filters
105 Extend QObject to create keyboard filter
106 Extends QAbstractListModel to create file list model
107 Extends QDesignerCustomWidgetInterface
108 Extends QDialog
109 Extends QLayout to create border layout
110 Extends QLayout to create flow layout
111 Extends QPushButton
112 Extends QSortFilterProxyModel to create your own filter model
113 Extends QStandardItemModel
114 Extends QString
115 Extends QStyle
116 Extends QStylePlugin
117 Extends QTextEdit
118 Extends QThread to create thread
119 Extends QWidget
120 Extends QXmlDefaultHandler
121 Filling Data Structures
122 Find dialog
123 Find file dialog
124 Find in text document
125 Find next element in a QList with QMutableListIterator
126 Font dialog demo
127 Foreach loop with QList
128 Format command line parameter with QString
129 Get attribute from QDomElement
130 Get currentRow() from QListWidget
131 Get dir and path from QFileInfo
132 Get drive information with QDrive
133 Get Page rectangle
134 Get printer resolution
135 Get QListWidgetItem from QListWidget
136 Get selected Items count from QListWidget
137 Get XML element by tag name
138 Get XML element from QDomNode
139 Grid Layout
140 GridLayout for pusb button
141 Gui connection
142 Handle QContextMenuEvent
143 Handle QFocusEvent
144 Handle QKeyEvent
145 Handle QMouseEvent
146 Hash Tables with QHash
147 Horizontal BoxLayout
148 Horizontal Spin box
149 How selections can be used directly on a model
150 How to compile and run Qt from command line
151 Image composer
152 Image viewer
153 Inherited slot
154 Install event filter for QLineEdit
155 Int model for QListView
156 Interact with QGraphicsItem
157 Invoke system application with QProcess
158 Is mouse left button clicked
159 Is QStack empty
160 Iterate QTreeWidgetItem
161 Layout two labels
162 License wizard dialog
163 Line editor
164 Linear Gradient
165 Link QAction and button
166 Link QLabel and QLineEdit
167 Load data to QTableView
168 Loopback QTcpServer and QTcpSocket
169 Mark method with Q_INVOKABLE
170 Matrix based translation
171 MdiWindow based editor
172 Minimum, Maximum, and Threshold Values
173 Mng file player
174 Model view controller
175 Multi-event handlers
176 Nested layout
177 ObjectTreeModel and QTreeView
178 Open a buffer for read-and-write operation
179 Open a text file in read-only mode
180 Open binary file for write-operation
181 Open dir dialog
182 Open file dialog demo
183 Open QFile with WriteOnly flag
184 Open text file for write-operation
185 Operate Sqlite database with QSqlDatabase
186 Order information dialog
187 Output QApplication
188 Output string with QTextStream
189 Output with QFile
190 Paint picture
191 Paint QSplitter
192 Paint rectangle
193 Paint with QBrush
194 Painter
195 Painter path
196 Pass window pointer to a Layout manager
197 Persistent indexes
198 Plain text layout
199 Port for drop event
200 Prepared statement
201 Pretty print XML
202 Print out Painted page
203 Print out text document
204 Producer and consumer and QSemaphore
205 Producer and consumer by Qt thread
206 Push to QStack
207 Push value to QStack, and pop out
208 Put table to text document
209 QAction with shortcut
210 QCalendarWidget demo
211 QColumnView and QStandardItem
212 QConicalGradient
213 QDate and QLocale
214 QDBusMessage and QDBusVariant
215 QDir and list files
216 QDir and name filter
217 QDir and path
218 QDoubleValidator and QLineEdit
219 QFontDatabase and QTreeWidget
220 QFtp base ftp window
221 QGraphicsView, QGraphicsItem and QGraphicsScene
222 QHash for object to int
223 QHash for string to int
224 QInputDialog
225 QLinearGradient and QPainter
226 QList of int
227 QList of QString
228 QListIterator and QStringList
229 QListView demo and QStandardItem
230 QListWidget
231 QListWidget drag and drop
232 QLowerBound() returns an iterator pointing to the first occurrence of the search element
233 QMap for string to int
234 QMap that associates a string to an integer value is created
235 QMessageBox
236 QMultiHash from QString to int
237 QMultiMap from QString to int
238 QMutableIterators to QList
239 QNetworkAccessManager based google suggest
240 QPointer for QLabel
241 QPolygon demo
242 Qprinter printing
243 QProcess
244 QQueue of QString
245 QRegExpValidator and QLineEdit
246 QScriptEngine registering objects
247 QSemaphore demo
248 QSet for QString
249 QSortFilterProxyModel and QAbstractItemModel
250 QSplitter, QListView and QTreeView
251 QSqlTableModel demo
252 QStack of QString
253 QStackedWidget based wizard
254 QStringList demo
255 QStringListModel and QStringList
256 QStringListModel and QStringList 2
257 QStyle options
258 QStyleOptionFocusRect and QStyle
259 Qt based application window
260 Qt based Ftp dialog
261 Qt cast
262 Qt class test
263 Qt MDI window
264 Qt SDI window
265 Qt signal test
266 Qt signals and slots
267 Qt type size
268 Qt UI loader
269 Qt UI mouse test
270 Qt UI test
271 Qt Unit test
272 QTableView demo and QStandardItem
273 QTableWidget and QTableWidgetItem
274 QTcpServer based server
275 QTcpServer based server 2
276 QTcpSocket based client
277 QTextBrowser and CSS
278 QTextEdit and QTextCursor
279 QTextFrame based calendar
280 QTextList and QTextListFormat
281 QTextTableFormat and QTextCharFormat
282 QTime and QLocale
283 QTreeView demo and QStandardItem
284 QTreeView drag and drop
285 QtSvg widget
286 Quick sort QList
287 Quick sort QStringList
288 Quick sort with custom function
289 Quit Qt application
290 QVariant model for QTableView
291 Radial Gradient
292 RadioButton in button group
293 Read byte array from text file
294 Read char from a QBuffer
295 Read datastream
296 Read file till file end
297 Read int from dialog
298 Read QTextStream line by line
299 Read text file line by line
300 Read text file QTextStream
301 Recent file menu
302 Register value to QScriptEngine
303 Render Area
304 Renderer pattern
305 Resize QTableWidget
306 Save created xml document to a file
307 Save file dialog
308 Saving file with QDataStream
309 Scribble area
310 SdiWindow based text editor
311 SdiWindow with toolbar and menubar
312 Search in a list of fruit names first for the word Pear and then for Orange
313 Seek position in a QBuffer
314 Ser range for Spin box
315 Serialization with QDataStream
316 Set buttons used by QMessageBox
317 Set Dash Pattern for QPen
318 Set dialog extension
319 Set entry 19 in the color table to yellow
320 Set filter for open file dialog
321 Set header for QTableView
322 Set icon used by QMessageBox
323 Set mask for QPixmap
324 Set model for QTableView
325 Set model for QTreeView
326 Set Palette before paint
327 Set pen and brush for QPainter
328 Set pen for Qt
329 Set push button checkable to true
330 Set QCleanlooksStyle
331 Set QLabel buddy
332 Set range for slider
333 Set render hint to QPainter
334 Set Stretch Factor for QSplitter
335 Set tooltip for QLabel
336 Set up Menu bar with QAction
337 Set up QSqlDatabase
338 Set up toolbar with QAction
339 Set value for QInputDialog
340 Set value to Spin box
341 Set view mode for QListView
342 Set zone for tooltip
343 Sets 32 bit pixel at (x,y) to yellow
344 Shape item widget
345 Shaped clock
346 SIP Dialog Example
347 Simple parse
348 Simple QWizard
349 Slider group
350 Some selections made using a table view
351 Sorting QList
352 Spin box
353 Split QStringList
354 STL-Style Iterators
355 Store QPoint in QVector
356 String list model example
357 Subclass QAbstractItemView
358 Subclass QCheckBox and handle mouse event
359 Subclass QEvent
360 Subclass QSortFilterProxyModel
361 Subclass QWidget
362 Subclass QWidget to do paint
363 Svg text object
364 Svg viewer
365 Synchronous Use of QProcess
366 System tray icon
367 Tab dialog
368 Tablet widget
369 Tetrix game
370 Text block format
371 Text block fragments
372 Text document blocks
373 Text document selection
374 The foreach Keyword
375 The String Lists Model
376 Thread based server
377 Thread sleeps
378 Three color QRadialGradient
379 Timer based action
380 Toggle button demo
381 Top level window
382 Transformation demo
383 Transformed Painter
384 Translate and scale QGraphicsItem
385 Udp based QUdpSocket
386 Udp server
387 Use GridLayout to align labels
388 Use GroupBox to hold Push buttons
389 Use qDebug to output file name
390 Use QDir
391 Use QPainter to draw arc
392 Use QRegExp to match phone numbers
393 User-draw table
394 Using for loop to add widget to Layout
395 Using group box
396 Using HTML with QLabel
397 Using Pen and Brush to draw
398 Using QAssistantClient
399 Using qDebug to output string
400 Using QDockWidget
401 Using QGraphicsPolygonItem
402 Using QGraphicsRectItem
403 Using QLineEdit
404 Using QMutableListIterator
405 Using QMutexLocker
406 Using QPainter to draw ellipse
407 Using QPrintDialog
408 Using QProcess
409 Using QProgressBar
410 Using QReadWriteLock
411 Using QScriptEngine
412 Using QSemaphore
413 Using QSlider to control custom component
414 Using QSplashScreen
415 Using QSqlRelationalTableModel
416 Using QStackedLayout
417 Using QStackedWidget
418 Using QStandardItemModel
419 Using QStandardItemModel 2
420 Using QStatus tip event
421 Using QStatusBar
422 Using QString as the parameter
423 Using QStringList, append to and output and join
424 Using QTextCharFormat
425 Using QTextCursor
426 Using QTextEdit
427 Using QTextFrame
428 Using QTextImageFormat
429 Using QTextList
430 Using QTextStream to read a text file
431 Using QThread
432 Using QTranslator
433 Using QTreeView
434 Using QVector
435 Using QWhatsThisClickedEvent and QWhatsThis
436 Using QX11EmbedContainer
437 Using QX11EmbedWidget
438 Using QXmlStreamWriter
439 Using sql database from Qt
440 Vertical BoxLayout
441 View a model in several views, and share a selection model
442 Wait condition
443 What is This Dialog
444 Widget style
445 Wiggly Widget
446 Window layout
447 Window style flags
448 Write only buffer
449 Write string to a QBuffer
450 Write to a position in a QBuffer
451 Writes image into ba in PNG format