SHOW:
|
|
- or go back to the newest paste.
| 1 | - | QString MainWindow::getLengthCurrentMedia(qint64 current){
|
| 1 | + | #include <QtCore/QTime> |
| 2 | - | QString sCurrent = ""; |
| 2 | + | #include <QtCore/QString> |
| 3 | - | QString sMinutes = ""; |
| 3 | + | |
| 4 | - | QString sSeconds = ""; |
| 4 | + | QString MainWindow::getLengthCurrentMedia(qint64 current) |
| 5 | - | current = current / 1000; |
| 5 | + | {
|
| 6 | - | int minutes = 0; |
| 6 | + | QTime t = QTime().addMSecs(current); |
| 7 | - | int seconds = 0; |
| 7 | + | return t.toString(); |
| 8 | - | minutes = current / 60; |
| 8 | + |