How does this syntax of findText() work
-
I am trying to use this function but whatever I try I just cannot please the compiler.
void QWebEngineView::findText(const QString &subString, QWebEnginePage::FindFlags options = QWebEnginePage::FindFlags())
const QString S = "/// B.V."; engine->findText(&S, QWebEnginePage::xxx); Debug() << S;
I don't understand the Qdoc and I don't know what to fill on the spot of the xxx.
I don't have special options I want to make use of. -
Why is there a '&' in the damned Qdocs? -_-"
Anyways I made my compiler happy again with your suggestion but I am not getting the purpose of this function. I can let it search for a certain string and I am just not seeing what the actually function does. It doesn't return anything and it doesn't set anything?
-
Hi,
Where did you saw that code sample ?
-
@SGaist said in How does this syntax of findText() work:
Hi,
Where did you saw that code sample ?
I only read the Qdoc and there aren't code examples in like 95% of those, hence my discontent of Qdocs
@jsulm said in How does this syntax of findText() work:
@bask185 Do you mean here:
const QString &subString
?
Here & means that subString is a reference. Are you familiar with C++?Familiar enough to avoid & en * wherever it is possible, I studied electrical engineering not IT and our programming teacher was one helluva clown. Unfortunately for me I can't avoid them most of the time. I know how to use them most often but I don't understand them.
Right now I know it well enough to get most stuff to work. I am already at like 3k lines of code and I expect I need another 1 or 2k before I am finished.