close
Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
Score of 1
4 answers
233 views

I am currently working with QPixmap to set an image to a label, but improvising a way around since my qrc file isn't working. I am trying to access the image folder in the project directory and trying ...
Score of -1
1 answer
59 views

I hope the value of str is 1.235. But in fact, the value is 1.234 by qt. Why? What happened in theory? double d=1.2345; auto str=QString::number(d,'f',3);
Score of 0
0 answers
141 views

How do you set the encoding of a QTextStream to "EUC-JP" ? The setEncoding function uses this enum: class QStringConverter : public QStringConverterBase { public: #endif // Qt 6 compat for ...
Score of 2
1 answer
107 views

I have a QString which stores a hashed input via the line hashedPass = QCryptographicHash::hash(input.toLocal8Bit(), QCryptographicHash::Sha256).toHex() I am trying to convert this code to an ...
Score of 0
1 answer
382 views

I need to change from operator""_qs to operator""_s, thanks to Qt 6.8. The following code compiles // notice no includes or using namespace of any kind auto const label = u"...
Score of 1
0 answers
97 views

Backstory ( You can skip ) Building a sgml parser Testing it with every html document on my computer locate *.html > /tmp/htmldump Coming across a lot of different type of documents: file "...
Score of -1
1 answer
146 views

When constructing an empty QString in Qt, QString() QString("") QLatin1String() QLatin1String("") QLatin1StringView() QLatin1StringView("") QStringLiteral() ...
user avatar
Score of 0
2 answers
205 views

Lets say I have a list of N arguments which I want to pass to a QString. The number N is variable and determined at runtime. If I do this: QString myString = "Some text %1, some other text %2,...,...
Score of 0
0 answers
83 views

I have been trying to send some temperature values read by 2 sensors connected to STM32 Microcontroller. I have already programmed the mc to send just 2 lines of temperature values (vertically and ...
Score of 0
0 answers
144 views

I'm searching for a safe method to escape all non-ASCII characters in a QString (and of course to un-escape them later) that will result in pure (printable) ASCII but yield the shortest possible ...
Score of 0
1 answer
143 views

I have two qmls among which one contain animation say animation.qml and one contain data say data.qml. I want to run my animation.qml for animating the content inside data.qml for that purpose I want ...
Score of 0
0 answers
75 views

Say I have the code below. QSet<QString> set; QList<QString> list; QString str("hello"); set.insert(str); list.append(str); Question: Is the QString deep-...
Score of 2
0 answers
707 views

I am making XmlReader and still don't know well where to use const modifier. With this code: const QMap<const QString, const QString> XmlElement::readDomAttributes( const QDomElement&...
Score of 0
0 answers
65 views

I'm stuck with this. I am trying to tokenize a multiline QString and count the number of lines. QStringList sentences = m_text.split(QRegularExpression("\n|$"), Qt::SkipEmptyParts); qDebug() ...
Score of 0
1 answer
171 views

Using the QtOpcUa library I read a "string" from a PLC. The retrieved data is a QVariant: void MyClass::opcua_valueChanged(QString key, QVariant value) { qDebug() << value; } here ...

15 30 50 per page
1
2 3 4 5
54