Link: @CplusplusQt Embedded: @EMBCpp • Allowed Topics: C++ and everything related to Qt • Use only English • No Private Message without asking user's permission • No NSFW • No Spam • No unauthorized Bots • No Offtopic • No Self Promotions
Welcome to the group, @Bogdan1720! :-)
Wanna share your story of how you started with Qt, QML or C++? Maybe some nice feature that made you stick with it.
Rules are set on the description of the group. :)
I wanted to make a code that passes the cin value of the question, and after I answer it, it saves it in a .txt file.
Читать полностью…Problem solved - I simply forgot to include the boundary in the header: Instead of
request.setHeader(QNetworkRequest::ContentTypeHeader,
"multipart/form-data");
it should have been
request.setHeader(QNetworkRequest::ContentTypeHeader,
QString("multipart/form-data; boundary=%1").arg(boundary).toLocal8Bit());
Hi! I have a problem uploading a binary file to a remote server (Telegram server). I'm uploading with multipart/form-data. Here's the code (apologies for spamming)
// Build request
QString url = QString("https://api.telegram.org/bot%1/sendDocument")
.arg(m_Token);
QNetworkRequest request(url);
request.setHeader(QNetworkRequest::ContentTypeHeader,
"multipart/form-data");
QByteArray payload;
const QString boundary = "StickerBoundary";
payload.append(
QString("Content-Type: multipart/form-data; boundary=%1\r\n")
.arg(boundary)
.toLocal8Bit());
payload.append("\r\n");
// Chat ID
payload.append(QString("--%1\r\n")
.arg(boundary)
.toLocal8Bit());
payload.append(
QString("Content-Disposition: form-data; name=\"%1\"\r\n")
.arg("chat_id")
.toLocal8Bit());
payload.append("\r\n");
payload.append(QString("%1\r\n")
.arg(QString::number(mcChatID))
.toLocal8Bit());
// Caption
payload.append(QString("--%1\r\n")
.arg(boundary)
.toLocal8Bit());
payload.append(
QString("Content-Disposition: form-data; name=\"%1\"\r\n")
.arg("caption")
.toLocal8Bit());
payload.append("\r\n");
payload.append(QString("%1\r\n")
.arg(file)
.toLocal8Bit());
// Data
payload.append(QString("--%1\r\n")
.arg(boundary)
.toLocal8Bit());
payload.append(QString("Content-Disposition: form-data; name=\"myfile\"; "
"filename=\"%1\"\r\n")
.arg(file)
.toLocal8Bit());
payload.append("Content-Type: application/zip\r\n");
payload.append("Content-Transfer-Encoding: base64\r\n");
payload.append("\r\n");
payload.append(file_data.toBase64());
payload.append("\r\n");
// Closing boundary
payload.append(QString("--%1--\r\n")
.arg(boundary)
.toLocal8Bit());
m_NetworkAccessManager -> post(request, payload);
As long as you have a git repository you can push it to github in many ways. The question is how to manage your local repository.
Читать полностью…I have QColorDialog
. How can I get rid of custom colors section? I do not want for user to be able to "remember" colors
I proposed some minor modifications to make it more efficient 10 years ago: https://www.qcustomplot.com/index.php/support/forum/475
I’m not sure they still work, but something similar should
It doesn’t really have a spectrogram, but you can use the ColorMap
Читать полностью…But may be if qt quick can be better for enhancing later
Читать полностью…okay, so for some reason, I can't get REP files to syntax highlight using Qt Creator- it keeps saying that "A highlight definition file was not found ..."
Читать полностью…I think you can duplicate stdout and read it back, but if you know what you are going to print you shouldn’t have to.
Читать полностью…Welcome to the group, @phoenix_9226! :-)
Wanna share your story of how you started with Qt, QML or C++? Maybe some nice feature that made you stick with it.
Rules are set on the description of the group. :)
In essence, I'm
1) Creating a netword request, and let it know that the content will be multipart/form-data
2) Creating a payload with all the data
3) Posting the whole thing.
Result: No file uploaded. Maybe there's an error handling this somewhere, but I'm unsure where to start looking.
Welcome to the group, @nknnkvmksm! :-)
Wanna share your story of how you started with Qt, QML or C++? Maybe some nice feature that made you stick with it.
Rules are set on the description of the group. :)
Perhaps i can share my waterfall control, but i should clean it up a bit first…
Читать полностью…Then i think you have to create a custom control though. It’s not that hard (i have done it), but it requires some work
Читать полностью…Hello friends i want to ask about, how can i drow RF waterfall and polar plot using qt on windows but using mingw64
Читать полностью…yeah.. I guess I don't really have a choice if have a pure qml constraint though
Читать полностью…