开发者

QT overview/tutorial? [closed]

开发者 https://www.devze.com 2023-03-02 10:02 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. 开发者_StackOverflow Closed 10 years ago.

Does anyone know of any good tutorials/articles which give a broad overview of QT? I'm not looking for a verbose "type this in and this is what it does" kind of tutorial (e.g. Nokia's/Troll Tech's tutorials, I can look at the api docs up for this stuff), but rather something which explains the thought process and considerations which go into making a QT app (for example, the idea of connecting signals to slots, what a widget is and isn't, how the API is organized, etc.).


I recommend reading the following conceptual documents from the Qt Documentation itself:

The Core

  • Object Model presents the why and how Qt extends the plain C++ object model with the metaobject compiler and what features it adds.
  • Object Trees and Ownership illustrates the preferred way of managing dynamically allocated QObjects in Qt. (Notice: preferred, not mandatory.)
  • Signals and Slots explains this basic concept in greater depth.
  • Container Classes presents the STL-compatible, collection-like classes adopted by the Qt API. An important concept, implicit sharing, is also introduced.
  • The Qt Resource System describes how data can be embedded in your program or library and accessed at runtime through a special file system.
  • You're doing it wrong is a blog post explaining how to properly use the QThread class. This is a good read because the documentation and all examples are wrong.
  • Debugging Techniques are a few debugging tips that are peculiar to Qt. In particular, it explains how to use the qDebug construct.

Here's the full list of core documents.

GUI and Graphics

  • Widgets and Layouts defines what widgets are and how they are assembled on the screen.
  • Window and Dialog Widgets explains the subtle difference between what Qt treats as windows and what it treats as widgets.
  • Layout Management goes into further detail about widget layout. If you use the built in UI designer, you'll rarely need to fiddle with layout classes directly, but the concepts are nevertheless important.
  • Paint System is how Qt draws stuff.
  • Coordinate System illustrates how Qt interprets graphics coordinates on painting devices.
  • Qt Quick is the new way of building pretty UIs.

Here's the full list of GUI and Graphics documents.

By the time you understand the basics, the rest of the API is very cohesive, consistent and easy to grasp.


You can try C++ GUI Programming with QT4


The Foundations of Qt Development is great. Both the book and the source code are useful.

0

精彩评论

暂无评论...
验证码 换一张
取 消