How can you give a line text an auto incrementing default value from within QtDesigner?



  • For instance I have a dialog that lets the user create new documents. The default name of the document should be 'Document n', where n is the incremented integer count of the last used free number. So the first document is 'Document 1', the next one is 'Document 2', etc. Is it possible to express this in QtDesigner?



  • Since this is program logic (the document name is not just something superficial that lives in the user interface, but an important property of the file representation in the application), even if it were possible to do it in QtDesigner – which I don't think it is – it should be done programmatically.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.