Dear visitor who can read English
This page is a page translated automatically by Google AJAX Language API.
Please comment to this page if you could not understand. A PERSON will review this page .
I think that you will be able to understand this page later. Please give a little time to us.
Best regards,
This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?[:]
Class MyName that is exactly the same as the previous sample.
QList only address the management.
Line 18, QList case management to address, you must delete themselves.
Function is able to implement it, qDeleteAll.
When you delete by itself, a step there, it is useful to know.
The following results and try to compile and run it.
Does not change anything.
It is only by comparing the address of an object is a natural result.
To compare the contents of the object are required, they must have a function that compare.
Below, for example, MyName comparison class provides static methods.
We sorted out.
Here, MyName in, static methods are available, the same argument, the usual sort C can be the same to them and provide the function.
Now, the last qUpperBound, qLowerBound Let's do a little bit.
QList in, find a location
qUpperBound, qLowerBound, the use is a very useful function, and then try to explain it.
qUpperBound, qLowerBound, respectively, in the sort QList the end of the specified information, the first is able to output iterator.
Described in a simple example.
With a name like: you have a QList <MyName>.
i.e) If it wants all items where you include word "Test", the function of qUpperBound and qLowerBound will help you very powerful.
Thus, qUpperBound, qLowerBound use.
my_check is the object for comparison.
ipos1 in, QList [5]
= test1 ipos2 in, QList [2]
= test Is set.
In other words, qLowerBound will hunt first object of "test" (QList [2]).
Also, qUpperBound will hunt last (+1) object of "test" (QList [5]).
The last, QList [4]
However, note that you retrieve the +1 position.
The following is an existence of sorts, which is testing whether search?
Naturally, if the operation is not sorted in ascending order is not guaranteed.
This process has made a basic sort.
QtAlgorithms, search and other qFind, copy and qCopy are useful.
QtAlgorithms is basically a template iterator class work if you're managing.
(QVector from, QList, and can be copied to.
)
You can create your own, it is useful to know.
If you have noticed something, I would appreciate comments.
February 3rd, 2014 @ 11:26:06
buena informacion
me ayudo en mucho