Qt: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 3: Zeile 3:
== Installation ==
== Installation ==
<pre>apt-get install essential cmake gdb
<pre>apt-get install essential cmake gdb
qt-unified-linux-x64-2.0.5-online.run
#Benutzer: qt.io <at> h*.de
</pre>
</pre>



Version vom 9. März 2017, 10:25 Uhr


Installation

apt-get install essential cmake gdb
qt-unified-linux-x64-2.0.5-online.run
#Benutzer: qt.io <at> h*.de

RegExpr

QRegularExpression regExpr("(\\d+)x(\\d+)");
QRegularExpressionMatch match = regExpr.match(line);
if (match.hasMatch()){
   QString width = match.captured(1);
   QString height = match.captured(2);
}

QRegularExpression re("(\\w+)");
QRegularExpressionMatchIterator i = re.globalMatch(line);
while(i.hasNext()){
   QRegularExpressionMatch match = i.next();
   QString word = match.captured(1);
}