Answer the question
In order to leave comments, you need to log in
The data in jquery-ui.autocomplete comes, but the list is not displayed, no one has encountered such a problem?
I'm trying to use autocomplete like this:
$myCtrl.autocomplete({
source: function (request, response) {
var term = request.term;
$.ajax({
url: '[% Env("Baselink") %]Action=RS_Diagnosis&Subaction=GetCustomerUser&[% Env("SessionName") | html %]=[% Env("SessionID") | html %]&term=' + term,
type: "get",
dataType: "json",
success: function (data) {
response(data);
},
});
},
minLength: 2,
delay: 600,
});
[
{"id":"first","value":"first","label":"First <[email protected]>"},
{"id":"olga","value":"olga","label":"Olga <[email protected]>"},
{"id":"zanak","value":"zanak","label":"Zanak <[email protected]>"}
]
Answer the question
In order to leave comments, you need to log in
This is the initialization of the class fields.
If you wrote in Java style - like this ( we'll QObject
skip it for now):
Get::Get(const QString &peer, const QString &objectId, QObject *parent) :
QObject(parent)
{
this->peer = peer;
this->objectId = objectId;
this->socket = new QUdpSocket(this);
...
peer
, objectId
, socket
) would first be created with their default constructors and then assigned to them . That is, these are 2 actions, instead of one - calling the correct constructor immediately ( initialization ). QObject
, it is the parent class for the type Get
, so you also need to call the constructor on itQObject(QObject *parent)
Question removed.
The explicit indication of z-index for the control, to which the autocompleter is attached, helped. Under the penguin, everything worked without it, but under M $ it didn’t work. It is a pity that I did not see this in a pile of layers earlier.
Thank you all for your attention.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question