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
QHttpServerResponder* resp = new QHttpServerResponder(std::move(responder));
resp->write(td ,QString().toUtf8());
if you go to http://localhost:8080 it starts an infinite download, and if you abort it the TestDevice will be deleted
Читать полностью…Welcome to the group, @excitedmuffin! :-)
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. :)
@xLabel will probably be replaced with the value of xLabel when the string is needed
Читать полностью…Hello friends, does anyone know what exactly @
means in this QML code:
itemLabelFormat: "Series 1: X:@xLabel Y:@yLabel Z:@zLabel"
I'm really late but i assume you could play with opacity?
Читать полностью…(QHttpServerResponder&& responder)
this is made the way it deletes responder out of scope
don’t use sleep, just put fixed bytesAvailable and atEnd always false
Читать полностью…no, it runs until you cancel the download in the web browser
Читать полностью…I tested it with this:
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QHttpServer server;
server.route("/", QHttpServerRequest::Method::Get, [](QHttpServerResponder&& responder)
{
TestDevice* td = new TestDevice();
responder.write(td ,QString().toUtf8());
});
server.listen(QHostAddress::Any, 8080);
return a.exec();
}
oww, that's good to know, thanks... 'cause I actually searched about placeholders in c++ and i thought they aren't really what they meant here....
Читать полностью…OK, fair enough. But here i've got an example from the Qt documentation page regarding Bars3D:
Item {
width: 640
height: 480
Bars3D {
width: parent.width
height: parent.height
Bar3DSeries {
itemLabelFormat: "@colLabel, @rowLabel: @valueLabel"
ItemModelBarDataProxy {
itemModel: dataModel
// Mapping model roles to bar series rows, columns, and values.
rowRole: "year"
columnRole: "city"
valueRole: "expenses"
}
}
}
ListModel {
id: dataModel
ListElement{ year: "2012"; city: "Oulu"; expenses: "4200"; }
ListElement{ year: "2012"; city: "Rauma"; expenses: "2100"; }
....
}
}
@colLabel, @rowLabel: @valueLabel
is applied, showing, e.g. Oulu, 2012: 4200
. Where are these placeholders ( such as @rowLabel
) defined exactly in either the website or documentation?
Читать полностью…
No, it’s used in lots of places. Like
%d in
printf(“%d”, 5)
I’m not sure, but i would guess it defines placeholders
Читать полностью…Let's not explain something with conspiracy when it can be perfectly explained with stupidity
Читать полностью…