Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QtGui>
5#include <QApplication>
6#include <stdio.h>
7
8class Widget : public QWidget
9{
10public:
11 Widget(QWidget *parent = nullptr);
12
13 void constCharPointer();
14 void constCharArray();
15 void characterReference();
16 void atFunction();
17 void stringLiteral();
18 void modify();
19 void index();
21 void nullVsEmpty();
22
23 void appendFunction();
24 void argFunction();
25 void chopFunction();
26 void compareFunction();
28 void containsFunction();
29 void countFunction();
30 void dataFunction();
31 void endsWithFunction();
32 void fillFunction();
34
35 void indexOfFunction();
37 void insertFunction();
38 void isNullFunction();
39 void isEmptyFunction();
41 void firstFunction();
43 void slicedFunction();
44 void sliceFunction();
45 void numberFunction();
46
47 void prependFunction();
48 void removeFunction();
49 void replaceFunction();
50 void reserveFunction();
51 void resizeFunction();
52 void lastFunction();
54 void sectionFunction();
55 void setNumFunction();
56 void simplifiedFunction();
57
58 void sizeFunction();
59 void splitFunction();
61 void sprintfFunction();
62 void startsWithFunction();
63 void toDoubleFunction();
64 void toFloatFunction();
65 void toIntFunction();
66 void toLongFunction();
67 void toLongLongFunction();
68
69 void toLowerFunction();
70 void toShortFunction();
71 void toUIntFunction();
72 void toULongFunction();
74 void toUShortFunction();
75 void toUpperFunction();
76 void trimmedFunction();
77 void truncateFunction();
78
79 void plusEqualOperator();
80 void arrayOperator();
81};
82
84 : QWidget(parent)
85{
86}
87
89{
91 QString str = "Hello";
93}
94
96{
98 static const QChar data[4] = { 0x0055, 0x006e, 0x10e3, 0x03a3 };
99 QString str(data, 4);
101}
102
104{
106 QString str;
107 str.resize(4);
108
109 str[0] = QChar('U');
110 str[1] = QChar('n');
111 str[2] = QChar(0x10e3);
112 str[3] = QChar(0x03a3);
114}
115
117{
119 QString str;
120
121 for (qsizetype i = 0; i < str.size(); ++i) {
122 if (str.at(i) >= QChar('a') && str.at(i) <= QChar('f'))
123 qDebug() << "Found character in range [a-f]";
124 }
126}
127
129{
131 QString str;
132
133 if (str == "auto" || str == "extern"
134 || str == "static" || str == "register") {
135 // ...
136 }
138}
139
141{
143 QString str = "and";
144 str.prepend("rock "); // str == "rock and"
145 str.append(" roll"); // str == "rock and roll"
146 str.replace(5, 3, "&"); // str == "rock & roll"
148}
149
151{
153 QString str = "We must be <b>bold</b>, very <b>bold</b>";
154 qsizetype j = 0;
155
156 while ((j = str.indexOf("<b>", j)) != -1) {
157 qDebug() << "Found <b> tag at index position" << j;
158 ++j;
159 }
161}
162
165{
167 if (b)
168 result = "True";
169 else
170 result = "False";
171 return result;
172}
174
175
177{
179 QString().isNull(); // returns true
180 QString().isEmpty(); // returns true
181
182 QString("").isNull(); // returns false
183 QString("").isEmpty(); // returns true
184
185 QString("abc").isNull(); // returns false
186 QString("abc").isEmpty(); // returns false
188}
189
191{
193 QString x = "free";
194 QString y = "dom";
195
196 x.append(y);
197 // x == "freedom"
199
201 x.insert(x.size(), y);
203}
204
206{
208 QString i; // current file's number
209 QString total; // number of files to process
210 QString fileName; // current file's name
211
212 QString status = QString("Processing file %1 of %2: %3")
213 .arg(i).arg(total).arg(fileName);
215
216 {
218 int i; // current file's number
219 int total; // number of files to process
220 QStringView fileName; // current file's name
221
222 QString status = QString("Processing file %1 of %2: %3")
223 .arg(i).arg(total).arg(fileName);
225 }
226
228 QString str;
230 str = "%1 %2";
231
232 str.arg("%1f", "Hello"); // returns "%1f Hello"
233 str.arg("%1f").arg("Hello"); // returns "Hellof %2"
235
237 str = "%1%3%2";
238 str.arg("Hello").arg(20).arg(50); // returns "Hello500"
239
240 str = "%1%2%3";
241 str.arg("Hello").arg(50).arg(20); // returns "Hello5020"
243
245 str = "%1%3%2";
246 str.arg("Hello", QString::number(20), QString::number(50)); // returns "Hello5020"
248
250 str = QString("Decimal 63 is %1 in hexadecimal")
251 .arg(63, 0, 16);
252 // str == "Decimal 63 is 3f in hexadecimal"
253
255 str = QString("%1 %L2 %L3")
256 .arg(12345)
257 .arg(12345)
258 .arg(12345, 0, 16);
259 // str == "12345 12,345 3039"
261}
262
264{
266 QString str("LOGOUT\r\n");
267 str.chop(2);
268 // str == "LOGOUT"
270}
271
273{
274 int x = QString::compare("auto", "auto"); // x == 0
275 int y = QString::compare("auto", "car"); // y < 0
276 int z = QString::compare("car", "auto"); // z > 0
277}
278
280{
282 int x = QString::compare("aUtO", "AuTo", Qt::CaseInsensitive); // x == 0
283 int y = QString::compare("auto", "Car", Qt::CaseSensitive); // y > 0
284 int z = QString::compare("auto", "Car", Qt::CaseInsensitive); // z < 0
286
288 int x = QtPrivate::compareStrings(u"aUtO", u"AuTo", Qt::CaseInsensitive); // x == 0
289 int y = QtPrivate::compareStrings(u"auto", u"Car", Qt::CaseSensitive); // y > 0
290 int z = QtPrivate::compareStrings(u"auto", u"Car", Qt::CaseInsensitive); // z < 0
292}
293
295{
297 QString str = "Peter Pan";
298 str.contains("peter", Qt::CaseInsensitive); // returns true
300}
301
303{
305 QString str = "banana and panama";
306 str.count(QRegularExpression("a[nm]a")); // returns 4
308}
309
311{
313 QString str = "Hello world";
314 QChar *data = str.data();
315 while (!data->isNull()) {
316 qDebug() << data->unicode();
317 ++data;
318 }
320}
321
323{
325 QString str = "Bananas";
326 str.endsWith("anas"); // returns true
327 str.endsWith("pple"); // returns false
329}
330
332{
334 QString str = "Berlin";
335 str.fill('z');
336 // str == "zzzzzz"
337
338 str.fill('A', 2);
339 // str == "AA"
341}
342
344{
346 QRegularExpression pattern("\u00A4");
347 static const QChar unicode[] = {
348 0x005A, 0x007F, 0x00A4, 0x0060,
349 0x1009, 0x0020, 0x0020};
350 qsizetype size = sizeof(unicode) / sizeof(QChar);
351
353 if (str.contains(pattern) {
354 // ...
356 }
358}
359
361{
363 QString x = "sticky question";
364 QString y = "sti";
365 x.indexOf(y); // returns 0
366 x.indexOf(y, 1); // returns 10
367 x.indexOf(y, 10); // returns 10
368 x.indexOf(y, 11); // returns -1
370}
371
373{
375 QString str = "the minimum";
376 str.indexOf(QRegularExpression("m[aeiou]"), 0); // returns 4
377
378 QString str = "the minimum";
380 str.indexOf(QRegularExpression("m[aeiou]"), 0, &match); // returns 4
381 // match.captured() == mi
383}
384
386{
388 QString str = "Meal";
389 str.insert(1, QString("ontr"));
390 // str == "Montreal"
392}
393
395{
397 QString().isEmpty(); // returns true
398 QString("").isEmpty(); // returns true
399 QString("x").isEmpty(); // returns false
400 QString("abc").isEmpty(); // returns false
402}
403
405{
407 QString().isNull(); // returns true
408 QString("").isNull(); // returns false
409 QString("abc").isNull(); // returns false
411}
412
414{
416 QString x = "crazy azimuths";
417 QString y = "az";
418 x.lastIndexOf(y); // returns 6
419 x.lastIndexOf(y, 6); // returns 6
420 x.lastIndexOf(y, 5); // returns 2
421 x.lastIndexOf(y, 1); // returns -1
423
425 QString str = "the minimum";
426 str.lastIndexOf(QRegularExpression("m[aeiou]")); // returns 8
427
428 QString str = "the minimum";
430 str.lastIndexOf(QRegularExpression("m[aeiou]"), -1, &match); // returns 8
431 // match.captured() == mu
433}
434
436{
438 QString x = "Pineapple";
439 QString y = x.first(4); // y == "Pine"
441}
442
444{
446 QString s = "apple";
447 QString t = s.leftJustified(8, '.'); // t == "apple..."
449
451 QString str = "Pineapple";
452 str = str.leftJustified(5, '.', true); // str == "Pinea"
454}
455
457{
459 QString x = "Nine pineapples";
460 QString y = x.sliced(5, 4); // y == "pine"
461 QString z = x.sliced(5); // z == "pineapples"
463}
464
466{
468 long a = 63;
469 QString s = QString::number(a, 16); // s == "3f"
470 QString t = QString::number(a, 16).toUpper(); // t == "3F"
472}
473
475{
477 QString x = "ship";
478 QString y = "air";
479 x.prepend(y);
480 // x == "airship"
482}
483
485{
487 QString s = "Montreal";
488 s.remove(1, 4);
489 // s == "Meal"
491
493 QString t = "Ali Baba";
495 // t == "li Bb"
497
499 QString r = "Telephone";
500 r.remove(QRegularExpression("[aeiou]."));
501 // r == "The"
503}
504
506{
508 QString x = "Say yes!";
509 QString y = "no";
510 x.replace(4, 3, y);
511 // x == "Say no!"
513
515 QString str = "colour behaviour flavour neighbour";
516 str.replace(QString("ou"), QString("o"));
517 // str == "color behavior flavor neighbor"
519
521 QString equis = "xxxxxx";
522 equis.replace("xx", "x");
523 // equis == "xxx"
525
527 QString s = "Banana";
528 s.replace(QRegularExpression("a[mn]"), "ox");
529 // s == "Boxoxa"
531
533 QString t = "A <i>bon mot</i>.";
534 t.replace(QRegularExpression("<i>([^<]*)</i>"), "\\emph{\\1}");
535 // t == "A \\emph{bon mot}."
537}
538
540{
543 qsizetype maxSize;
544 bool condition;
545 QChar nextChar;
546
547 result.reserve(maxSize);
548
549 while (condition)
550 result.append(nextChar);
551
552 result.squeeze();
554}
555
557{
559 QString s = "Hello world";
560 s.resize(5);
561 // s == "Hello"
562
563 s.resize(8);
564 // s == "Hello???" (where ? stands for any character)
566
568 QString t = "Hello";
569 r.resize(t.size() + 10, 'X');
570 // t == "HelloXXXXXXXXXX"
572
574 QString r = "Hello";
575 r = r.leftJustified(10, ' ');
576 // r == "Hello "
578}
579
581{
583 QString x = "Pineapple";
584 QString y = x.last(5); // y == "apple"
586}
587
589{
591 QString s = "apple";
592 QString t = s.rightJustified(8, '.'); // t == "...apple"
594
596 QString str = "Pineapple";
597 str = str.rightJustified(5, '.', true); // str == "Pinea"
599}
600
602{
604 QString str;
606 QString csv = "forename,middlename,surname,phone";
607 QString path = "/usr/local/bin/myapp"; // First field is empty
609
610
611 str = csv.section(',', 2, 2); // str == "surname"
612 str = path.section('/', 3, 4); // str == "bin/myapp"
613 str = path.section('/', 3, 3, flag); // str == "myapp"
615
617 str = csv.section(',', -3, -2); // str == "middlename,surname"
618 str = path.section('/', -1); // str == "myapp"
620
622 QString data = "forename**middlename**surname**phone";
623
624 str = data.section("**", 2, 2); // str == "surname"
625 str = data.section("**", -3, -2); // str == "middlename**surname"
627
629 QString line = "forename\tmiddlename surname \t \t phone";
630 QRegularExpression sep("\\s+");
631 str = line.section(sep, 2, 2); // str == "surname"
632 str = line.section(sep, -3, -2); // str == "middlename surname"
634}
635
637{
639 QString str;
640 str.setNum(1234); // str == "1234"
642}
643
645{
647 QString str = " lots\t of\nwhitespace\r\n ";
648 str = str.simplified();
649 // str == "lots of whitespace";
651}
652
654{
656 QString str = "World";
657 qsizetype n = str.size(); // n == 5
658 str.data()[0]; // returns 'W'
659 str.data()[4]; // returns 'd'
661}
662
664{
666 QString str;
668
669 str = "Some text\n\twith strange whitespace.";
670 list = str.split(QRegularExpression("\\s+"));
671 // list: [ "Some", "text", "with", "strange", "whitespace." ]
673
675 str = "This time, a normal English sentence.";
677 // list: [ "This", "time", "a", "normal", "English", "sentence" ]
679
681 str = "Now: this sentence fragment.";
683 // list: [ "", "Now", ": ", "this", " ", "sentence", " ", "fragment", "." ]
685}
686
688{
690 QString str = QStringLiteral("a,,b,c");
691
692 QStringList list1 = str.split(u',');
693 // list1: [ "a", "", "b", "c" ]
694
696 // list2: [ "a", "b", "c" ]
698
700 QString str = "abc";
701 auto parts = str.split(QString());
702 // parts: {"", "a", "b", "c", ""}
704
706 QString str = "/a/b/c/";
707 auto parts = str.split(u'/');
708 // parts: {"", "a", "b", "c", ""}
710}
711
713{
716 QTextStream(&result) << "pi = " << 3.14;
717 // result == "pi = 3.14"
719}
720
722{
724 QString str = "Bananas";
725 str.startsWith("Ban"); // returns true
726 str.startsWith("Car"); // returns false
728}
729
731{
733 QString str = "1234.56";
734 double val = str.toDouble(); // val == 1234.56
736
738 bool ok;
739 double d;
740
741 d = QString( "1234.56e-02" ).toDouble(&ok); // ok == true, d == 12.3456
742
743 d = QString( "1234.56e-02 Volt" ).toDouble(&ok); // ok == false, d == 0
745
747 d = QString( "1234,56" ).toDouble(&ok); // ok == false
748 d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56
750
752 d = QString( "1,234,567.89" ).toDouble(&ok); // ok == false
753 d = QString( "1234567.89" ).toDouble(&ok); // ok == true
755}
756
758{
760 QString str1 = "1234.56";
761 str1.toFloat(); // returns 1234.56
762
763 bool ok;
764 QString str2 = "R2D2";
765 str2.toFloat(&ok); // returns 0.0, sets ok to false
766
767 QString str3 = "1234.56 Volt";
768 str3.toFloat(&ok); // returns 0.0, sets ok to false
770}
771
773{
775 QString str = "FF";
776 bool ok;
777 int hex = str.toInt(&ok, 16); // hex == 255, ok == true
778 int dec = str.toInt(&ok, 10); // dec == 0, ok == false
780}
781
783{
785 QString str = "FF";
786 bool ok;
787
788 long hex = str.toLong(&ok, 16); // hex == 255, ok == true
789 long dec = str.toLong(&ok, 10); // dec == 0, ok == false
791}
792
794{
796 QString str = "FF";
797 bool ok;
798
799 qint64 hex = str.toLongLong(&ok, 16); // hex == 255, ok == true
800 qint64 dec = str.toLongLong(&ok, 10); // dec == 0, ok == false
802}
803
805{
807 QString str = "The Qt PROJECT";
808 str = str.toLower(); // str == "the qt project"
810}
811
813{
815 QString str = "FF";
816 bool ok;
817
818 short hex = str.toShort(&ok, 16); // hex == 255, ok == true
819 short dec = str.toShort(&ok, 10); // dec == 0, ok == false
821}
822
824{
826 QString str = "FF";
827 bool ok;
828
829 uint hex = str.toUInt(&ok, 16); // hex == 255, ok == true
830 uint dec = str.toUInt(&ok, 10); // dec == 0, ok == false
832}
833
835{
837 QString str = "FF";
838 bool ok;
839
840 ulong hex = str.toULong(&ok, 16); // hex == 255, ok == true
841 ulong dec = str.toULong(&ok, 10); // dec == 0, ok == false
843}
844
846{
848 QString str = "FF";
849 bool ok;
850
851 quint64 hex = str.toULongLong(&ok, 16); // hex == 255, ok == true
852 quint64 dec = str.toULongLong(&ok, 10); // dec == 0, ok == false
854}
855
857{
859 QString str = "FF";
860 bool ok;
861
862 ushort hex = str.toUShort(&ok, 16); // hex == 255, ok == true
863 ushort dec = str.toUShort(&ok, 10); // dec == 0, ok == false
865}
866
868{
870 QString str = "TeXt";
871 str = str.toUpper(); // str == "TEXT"
873}
874
876{
878 QString str = " lots\t of\nwhitespace\r\n ";
879 str = str.trimmed();
880 // str == "lots\t of\nwhitespace"
882}
883
885{
887 QString str = "Vladivostok";
888 str.truncate(4);
889 // str == "Vlad"
891}
892
894{
896 QString x = "free";
897 QString y = "dom";
898 x += y;
899 // x == "freedom"
901}
902
904{
906 QString str;
907
908 if (str[0] == QChar('?'))
909 str[0] = QChar('_');
911}
912
914{
916 QString x = u"Nine pineapples"_s;
917 x.slice(5); // x == "pineapples"
918 x.slice(4, 3); // x == "app"
920}
921
922
923int main(int argc, char *argv[])
924{
925 QApplication app(argc, argv);
927 widget.show();
928 return app.exec();
929}
The QApplication class manages the GUI application's control flow and main settings.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
\inmodule QtCore
static void setDefault(const QLocale &locale)
\nonreentrant
Definition qlocale.cpp:1295
@ UnitedStates
Definition qlocale.h:816
@ English
Definition qlocale.h:119
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
\inmodule QtCore
\inmodule QtCore
Definition qstringview.h:78
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString & slice(qsizetype pos)
Definition qstring.h:201
double toDouble(bool *ok=nullptr) const
Returns the string converted to a double value.
Definition qstring.cpp:7904
qsizetype indexOf(QLatin1StringView s, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition qstring.cpp:4517
qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
Definition qstring.h:296
int toInt(bool *ok=nullptr, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
Definition qstring.h:731
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
Definition qstring.cpp:5455
QString & fill(QChar c, qsizetype size=-1)
Sets every character in the string to character ch.
Definition qstring.cpp:6358
QString & replace(qsizetype i, qsizetype len, QChar after)
Definition qstring.cpp:3824
QString sliced(qsizetype pos) const &
Definition qstring.h:394
QString rightJustified(qsizetype width, QChar fill=u' ', bool trunc=false) const
Returns a string of size() width that contains the fill character followed by the string.
Definition qstring.cpp:7061
void chop(qsizetype n)
Removes n characters from the end of the string.
Definition qstring.cpp:6340
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
Definition qstring.cpp:8218
void truncate(qsizetype pos)
Truncates the string at the given position index.
Definition qstring.cpp:6319
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:192
ushort toUShort(bool *ok=nullptr, int base=10) const
Returns the string converted to an {unsigned short} using base base, which is 10 by default and must ...
Definition qstring.h:729
bool isNull() const
Returns true if this string is null; otherwise returns false.
Definition qstring.h:994
qsizetype size() const noexcept
Returns the number of characters in this string.
Definition qstring.h:186
uint toUInt(bool *ok=nullptr, int base=10) const
Returns the string converted to an {unsigned int} using base base, which is 10 by default and must be...
Definition qstring.h:733
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
Definition qstring.cpp:8870
SectionFlag
This enum specifies flags that can be used to affect various aspects of the section() function's beha...
Definition qstring.h:337
@ SectionSkipEmpty
Definition qstring.h:339
QString section(QChar sep, qsizetype start, qsizetype end=-1, SectionFlags flags=SectionDefault) const
This function returns a section of the string.
Definition qstring.h:1284
static QString fromRawData(const QChar *, qsizetype size)
Constructs a QString that uses the first size Unicode characters in the array unicode.
Definition qstring.cpp:9482
QString first(qsizetype n) const &
Definition qstring.h:390
qulonglong toULongLong(bool *ok=nullptr, int base=10) const
Returns the string converted to an {unsigned long long} using base base, which is 10 by default and m...
QString simplified() const &
Definition qstring.h:451
QString leftJustified(qsizetype width, QChar fill=u' ', bool trunc=false) const
Returns a string of size width that contains this string padded by the fill character.
Definition qstring.cpp:7022
long toLong(bool *ok=nullptr, int base=10) const
Returns the string converted to a long using base base, which is 10 by default and must be between 2 ...
Definition qstring.h:735
qlonglong toLongLong(bool *ok=nullptr, int base=10) const
Returns the string converted to a {long long} using base base, which is 10 by default and must be bet...
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
Definition qstring.h:1226
float toFloat(bool *ok=nullptr) const
Returns the string converted to a float value.
Definition qstring.cpp:7950
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
Definition qstring.cpp:5506
short toShort(bool *ok=nullptr, int base=10) const
Returns the string converted to a short using base base, which is 10 by default and must be between 2...
Definition qstring.h:727
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
Definition qstring.cpp:6664
QString & insert(qsizetype i, QChar c)
Definition qstring.cpp:3132
QString toLower() const &
Definition qstring.h:435
QChar * data()
Returns a pointer to the data stored in the QString.
Definition qstring.h:1240
qsizetype count(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition qstring.cpp:4833
bool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition qstring.h:1369
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:8084
QString & append(QChar c)
Definition qstring.cpp:3252
QString trimmed() const &
Definition qstring.h:447
QString & setNum(short, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.h:1257
ulong toULong(bool *ok=nullptr, int base=10) const
Returns the string converted to an {unsigned long} using base base, which is 10 by default and must b...
Definition qstring.h:737
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
Definition qstring.cpp:3466
QString last(qsizetype n) const &
Definition qstring.h:392
QString & prepend(QChar c)
Definition qstring.h:478
QString toUpper() const &
Definition qstring.h:439
void resize(qsizetype size)
Sets the size of the string to size characters.
Definition qstring.cpp:2668
\inmodule QtCore
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
int y
the y coordinate of the widget relative to its parent and including any window frame
Definition qwidget.h:110
void show()
Shows the widget and its child widgets.
Definition qwidget.cpp:7875
void toLowerFunction()
Definition main.cpp:804
QString boolToString(bool b)
[7]
Definition main.cpp:164
void toShortFunction()
Definition main.cpp:812
void containsFunction()
Definition main.cpp:294
void slicedFunction()
Definition main.cpp:456
void stringLiteral()
Definition main.cpp:128
void arrayOperator()
Definition main.cpp:903
void compareFunction()
Definition main.cpp:272
void sprintfFunction()
Definition main.cpp:712
void toFloatFunction()
Definition main.cpp:757
void rightJustifiedFunction()
Definition main.cpp:588
void prependFunction()
Definition main.cpp:474
void fromRawDataFunction()
Definition main.cpp:343
void splitFunction()
Definition main.cpp:663
void toUpperFunction()
Definition main.cpp:867
void appendFunction()
Definition main.cpp:190
void chopFunction()
Definition main.cpp:263
void dataFunction()
Definition main.cpp:310
void compareSensitiveFunction()
Definition main.cpp:279
void trimmedFunction()
Definition main.cpp:875
void constCharPointer()
Definition main.cpp:88
void argFunction()
Definition main.cpp:205
void atFunction()
Definition main.cpp:116
void toDoubleFunction()
Definition main.cpp:730
void nullVsEmpty()
[7]
Definition main.cpp:176
void characterReference()
Definition main.cpp:103
void lastFunction()
Definition main.cpp:580
void startsWithFunction()
Definition main.cpp:721
void isEmptyFunction()
Definition main.cpp:394
void toIntFunction()
Definition main.cpp:772
void setNumFunction()
Definition main.cpp:636
void splitCaseSensitiveFunction()
Definition main.cpp:687
void countFunction()
Definition main.cpp:302
void modify()
Definition main.cpp:140
void firstFunction()
Definition main.cpp:435
void index()
Definition main.cpp:150
void replaceFunction()
Definition main.cpp:505
void insertFunction()
Definition main.cpp:385
void plusEqualOperator()
Definition main.cpp:893
void toUIntFunction()
Definition main.cpp:823
void simplifiedFunction()
Definition main.cpp:644
void resizeFunction()
Definition main.cpp:556
void sizeFunction()
Definition main.cpp:653
void toUShortFunction()
Definition main.cpp:856
void leftJustifiedFunction()
Definition main.cpp:443
Widget(QWidget *parent=nullptr)
void toLongFunction()
Definition main.cpp:782
void truncateFunction()
Definition main.cpp:884
void removeFunction()
Definition main.cpp:484
void fillFunction()
Definition main.cpp:331
void sectionFunction()
Definition main.cpp:601
void isNullFunction()
Definition main.cpp:404
void endsWithFunction()
Definition main.cpp:322
void reserveFunction()
Definition main.cpp:539
void indexOfFunction()
Definition main.cpp:360
void toLongLongFunction()
Definition main.cpp:793
void toULongLongFunction()
Definition main.cpp:845
void toULongFunction()
Definition main.cpp:834
void firstIndexOfFunction()
Definition main.cpp:372
void constCharArray()
Definition main.cpp:95
void numberFunction()
Definition main.cpp:465
void lastIndexOfFunction()
Definition main.cpp:413
void sliceFunction()
Definition main.cpp:913
QOpenGLWidget * widget
[1]
QString str
[2]
int main()
[0]
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION int compareStrings(QStringView lhs, QStringView rhs, Qt::CaseSensitivity cs=Qt::CaseSensitive) noexcept
@ CaseInsensitive
@ CaseSensitive
@ SkipEmptyParts
Definition qnamespace.h:128
#define qDebug
[1]
Definition qlogging.h:164
GLboolean GLboolean GLboolean b
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum condition
GLboolean r
[2]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat n
GLint y
GLdouble s
[6]
Definition qopenglext.h:235
GLuint GLfloat * val
GLdouble GLdouble t
Definition qopenglext.h:243
GLsizei const GLchar *const * path
GLuint64EXT * result
[6]
GLubyte * pattern
static constexpr QChar sep
#define QStringLiteral(str)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
unsigned long ulong
Definition qtypes.h:35
unsigned long long quint64
Definition qtypes.h:61
ptrdiff_t qsizetype
Definition qtypes.h:165
unsigned int uint
Definition qtypes.h:34
long long qint64
Definition qtypes.h:60
unsigned short ushort
Definition qtypes.h:33
QList< int > list
[14]
QApplication app(argc, argv)
[0]