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?
Читать полностью…
Let's not explain something with conspiracy when it can be perfectly explained with stupidity
Читать полностью…Heard of it before.
What’s astonishing is that those industries use Windows rather than Unix like OSes.
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"
Microsoft might have organized that crash on purpose to see what happens in reality...or how sensitive customers are...
Читать полностью…All American Airlines, Delta and United flights are grounded worldwide. Other airlines likely affected.
Lots of things affected.
Many plants, industries are shutdown, many flights are cancelled for the same reason.
Читать полностью…