← Back to team overview

uonedb-qt team mailing list archive

Using U1Db-Qt without a ListView

 

While developing one of the U1Db-Qt examples I came across a situation where I didn't necessarily want to use a ListView, because I only wanted to retrieve one known document.

While it is possible to work with ListView to achieve what was needed, it might also have unintended consequences because of the nature of the ListView.

For example, as mentioned I only want one known document, which after it is retrieved I want to place the value into a TextField. I can use a delegate in a ListView as long as only the one document I want is retrieved. If for whatever reason more than one is returned then the ListView will automatically be populated with the appropriate amount of delegates, which is not the desired situation for the use case I described.

Unless I missed something it does not seem possible to limit either the model or views to an absolute number of entries/documents/delegates.

Is there a way that U1Db can be used straight from a single TextField or similar element?

Kevin


Follow ups