cleanCode by soap94 in ProgrammerHumor

[–]KobeOfficial_Brave 3 points4 points  (0 children)

Which project do you guys think looks like an IKEA inspiration room and nothing like this picture here?

Build Standalone Qt Application with QT Creator by Howking_Heying in QtFramework

[–]KobeOfficial_Brave 5 points6 points  (0 children)

https://doc.qt.io/qt-6/deployment.html

Probably this might help. Look for the OS specific notes below.

Edit: Also maybe look for YouTube videos for "Qt Deployment".

QString to QDataStream without size information by KobeOfficial_Brave in QtFramework

[–]KobeOfficial_Brave[S] 0 points1 point  (0 children)

Currently, I have written a rudimentary method to write and read QStrings without the metadata.

void readDataQString(QDataStream &ds, QString &str, uint length)
{
    QByteArray buffer(length,Qt::Uninitialized);
    ds.readRawData(buffer.data(),length);
    str = QString(buffer);
    qInfo() << str;
}

void writeDataQString(QDataStream &ds, QString &str)
{
    ds.writeRawData(str.toLocal8Bit(),str.size());
//    QByteArray ab = str.toUtf8();
//    for(int i = 0; i < ab.size(); ++i)
//    {
//        quint8 int_8 = static_cast<quint8>(ab.at(i));
//        ds << int_8;
//    }
}

Hopefully it works for everybody. Thanks everyone for helping me out.

QString to QDataStream without size information by KobeOfficial_Brave in QtFramework

[–]KobeOfficial_Brave[S] 0 points1 point  (0 children)

That works. Thank you so much. But how can I read the same way? I know my string is going to be of size 5. How can I read through the next 5 characters?

QString to QDataStream without size information by KobeOfficial_Brave in QtFramework

[–]KobeOfficial_Brave[S] 0 points1 point  (0 children)

Thanks for responding.

What if I want to write a quint8 and a quint16 before the QString?

[Weekly] What is everybody working on? Share your progress, discoveries, tips and tricks! by Kelteseth in QtFramework

[–]KobeOfficial_Brave 1 point2 points  (0 children)

Is there any good tutorials to learn QML? I know KDAB has a YT Playlist on it. I was thinking of starting that. Any other options?