cplusplusqt | Unsorted

Telegram-канал cplusplusqt - C++ & Qt

1220

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

Subscribe to a channel

C++ & Qt

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. :)

Читать полностью…

C++ & Qt

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.

Читать полностью…

C++ & Qt

how save cout output to txt file

Читать полностью…

C++ & Qt

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());

Читать полностью…

C++ & Qt

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);

Читать полностью…

C++ & Qt

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.

Читать полностью…

C++ & Qt

I have QColorDialog. How can I get rid of custom colors section? I do not want for user to be able to "remember" colors

Читать полностью…

C++ & Qt

Yes, this is for the waterfall

Читать полностью…

C++ & Qt

I tested qchart and qcustom in the same data

Читать полностью…

C++ & Qt

I used it qchart gives higher performance

Читать полностью…

C++ & Qt

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

Читать полностью…

C++ & Qt

It doesn’t really have a spectrogram, but you can use the ColorMap

Читать полностью…

C++ & Qt

But may be if qt quick can be better for enhancing later

Читать полностью…

C++ & Qt

Qt Quick or Widgets?

Читать полностью…

C++ & Qt

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 ..."

Читать полностью…

C++ & Qt

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.

Читать полностью…

C++ & Qt

Is
app > textfile.txt
sufficient?

Читать полностью…

C++ & Qt

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. :)

Читать полностью…

C++ & Qt

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.

Читать полностью…

C++ & Qt

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. :)

Читать полностью…

C++ & Qt

what is the best publish

Читать полностью…

C++ & Qt

Perhaps i can share my waterfall control, but i should clean it up a bit first…

Читать полностью…

C++ & Qt

And qchart gave higher performance

Читать полностью…

C++ & Qt

You want the color map feature though

Читать полностью…

C++ & Qt

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

Читать полностью…

C++ & Qt

use Qt Quick. Use QML at all.

Читать полностью…

C++ & Qt

For widgets you can use QCustomPlot

Читать полностью…

C++ & Qt

Both if it is available

Читать полностью…

C++ & Qt

Hello friends i want to ask about, how can i drow RF waterfall and polar plot using qt on windows but using mingw64

Читать полностью…

C++ & Qt

yeah.. I guess I don't really have a choice if have a pure qml constraint though

Читать полностью…
Subscribe to a channel