How to Sort QListWidget Numeric Values Correctly | PyQt5 Tutorial
Описание
By default, when you sort a list in a QListWidget (in PyQt5, PySide2, Qt), the items are treated as regular text (or regular string). So when you are applying a sorting action to a list, the list will be sorted based on the string data type. This is an acceptable behavior if your items are text-based, but not when your list items are integers. In this PyQt5 tutorial, I will show you how to modify your PyQt5 code to properly sort numeric values.
Source Code: https://learndataanalysis.org/source-code-how-to-sort-qlistwidget-numeric-values-correctly-pyqt5-tutorial/
Buy Me a Coffee? Your support is much appreciated!
----------------------------------------------------------------------------------------------------------------
PayPal Me: https://www.paypal.me/jiejenn/5
Venmo: @Jie-Jenn
Patreon: https://www.patreon.com/JieJenn
Check out Kit →
https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=jiejenn&utm_content=description-only
Support my channel so I can continue making free contents
----------------------------------------------------------------------------------------------------------------
By shopping on Amazon → https://amzn.to/2JkGeMD
More tutorial videos on my website → https://LearnDataAnalysis.org
Follow Me on Facebook → https://www.facebook.com/Learn-Data-Analysis-101284561779059
Business Inquiring: YouTube@LearnDataAnalysis.org
#PyQt5 #Tutorial
Рекомендуемые видео



















