Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Application Development with Qt Creator - Second Edition
  • Toc
  • feedback
Application Development with Qt Creator - Second Edition

Application Development with Qt Creator - Second Edition

4 (25)
close
Application Development with Qt Creator - Second Edition

Application Development with Qt Creator - Second Edition

4 (25)

Overview of this book

This book is great for developers who are new to Qt and Qt Creator and who are interested in harnessing the power of Qt for cross-platform development. If you have basic experience programming in C++, you have what it takes to create engaging cross-platform applications using Qt and Qt Creator!
Table of Contents (15 chapters)
close
14
Index

Representing data using Qt's core classes


Probably the most common Qt core class you'll run into is QString, Qt's container class for character strings. It has similar capabilities to the C++ STL class, std::wstring. Like wstring, it's multibyte. You can construct one from a traditional C-style char * string or another QString.

QString has lots of helper methods, some of which are as follows:

  • append: This appends one QString class onto another

  • arg: This is used to build up formatted strings (instead of sprintf)

  • at and operator[]: These you can use to access a single character in the QString

  • operator==, operator!=, operator<, operator>, operator<=, and operator>=: These compare two QStrings

  • clear: This empties a QString and sets it to the null string

  • contains: This searches one string for another string or a regular expression

  • count: This counts the occurrences of a substring or character in a QString

  • startsWith and endsWith: These return true if a QString starts with or ends...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete