background preloader

Qt

Facebook Twitter

Syntax Highlighting in QTextEdit. The appropriate use of colors and fonts to highlight the different elements of programming and markup languages helps the brain to grasp document structures.

Syntax Highlighting in QTextEdit

By flagging syntax errors, interactive syntax highlighting also helps reduce the time spent in the "compile, run, test" cycle. Highlighting can even be used to flag spelling mistakes in text documents. With Qt, adding syntax highlighting to a QTextEdit is very easy, as this article will demonstrate. Qt 3.1 introduced QSyntaxHighlighter as an abstract base class to provide syntax highlighting to a QTextEdit. In Qt 4, the class was moved to the Qt3Support library, and a new QSyntaxHighlighter class took its place.

Subclassing QSyntaxHighlighter Adding syntax highlighting to a QTextEdit involves subclassing QSyntaxHighlighter, reimplementing the highlightBlock() function, and instantiating the QSyntaxHighlighter subclass with the QTextEdit's underlying QTextDocument (returned by QTextEdit::document()) as the parent. Qt library 4.7. Libqxt / wiki / Home – Bitbucket. C++ GUI Programmierung mit Qt 4: Die ... Entwicklung von Applikationen in Qt 4.0, Teil 2. In der ersten Folge des Workshops haben wir die Basisbegriffe kennengelernt, die zum Schreiben von Applikationen in Qt notwendig sind. Dies waren die Klassen QObject und QWidget sowie die darin eingebauten Signal- und Slot- sowie Ereignis- und Zeichnungsmechanismen. In diesem Teil verfolgen wir den Entwicklungsprozess einer größeren Applikation.

Programmieren unter Linux Das Programm QtCommander Dies wird ein ähnliches Programm wie Windows Commander sein, das zur Manipulation von Dateien dient. In diesem Artikel werden die ersten vier Versionen beschrieben. Die Klassen QAbstractItemModel und QTreeView, die das Model-View-Konzept implementieren das Ressourcen-System, das ermöglicht, Symbole und beliebige andere Dateien in die Applikation einzufügen den Fokus der Applikation (input focus) die Klassen QMainWindow, QToolBar, QMenuBar und QMenu, die zum Schreiben des Hauptfensters der Applikation dienen Die nächsten beiden Versionen werden im nächsten Teil beschrieben. Listing 1. Can we invoke an php script from QT - Qt Programming - QtForum.org. How to use Resource Editor with Qt Creator? - Forum Nokia Wiki.

This article demonstrates how to use Qt Creator's Resource Editor to set the icon and other resources for your application.

How to use Resource Editor with Qt Creator? - Forum Nokia Wiki

The Resource file is an XML file that lists the files to embed in the executable. The Qt resource system is a platform-independent mechanism for storing binary files in the application's executable. This is useful if your application always needs a certain set of files (icons, translation files, etc.) and you don't want to run the risk of losing the files. The resource used in a application are specified in a .qrc file which stores all necessary information regarding the resources used. Qt Labs Blog — the ramblings of engineers. Qt 3.0: Qt Tutorial #1 - The 14 Steps.

This tutorial gives an introduction to GUI programming using the Qt toolkit.

Qt 3.0: Qt Tutorial #1 - The 14 Steps

It doesn't cover everything: the emphasis is on teaching the programming philosophy of GUI programming, and Qt's features are introduced as needed. Some commonly used features are never used in this tutorial. Chapter one starts with a ten-line hello-world and each subsequent chapter introduces one or a few more concepts. By Chapter 14, the ten lines from Chapter 1 have turned into a 650-line game. If you're completely new to Qt, please read How to Learn Qt if you haven't already done so. Tutorial chapters: This little game doesn't look much like a modern GUI application. The Independent Qt Tutorial - TOC.

The Independent Qt Tutorial is an on-line book aiming to cover most topics involved in the process of developing professional quality Qt applications.

The Independent Qt Tutorial - TOC

The text is example driven, filled with lots of tips and has links to the official Qt documentation. If you are interested in the latest version of Qt, version 4, you might be interested to know that I've written a book called the Foundations of Qt Development available from APress. Table of Contents Italic chapter titles mark future chapters.