Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. timeedit mit millis?
Forum Updated to NodeBB v4.3 + New Features

timeedit mit millis?

Scheduled Pinned Locked Moved Solved German
3 Posts 2 Posters 648 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    farbtoaster
    wrote on last edited by
    #1

    Hallo,
    Ich bin noch ziemlich neu in C++ und QT und habe gerade ein problem das ich mit teilen möchte. :-)
    Ich habe in einem Dialog ein timeedit, die zurückgegeben zeit kann aber keine millisekunden.

    QTime ZeitDialog::getTime()
    {
        return(ui->timeEdit->time());
    }
    

    Gibts einen einfachen weg time() die sekundenbruchteile mitzugeben oder sollte ich mir selber was bauen?

    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2
      const QTime myTime = getTime();
      const int msec = myTime.msec();
      qDebug() << msec;
      

      …ruft Deine Methode auf, liest die Millisekunden und gibt sie aus.

      Hier ist die Dokumentation dazu.

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      2
      • F Offline
        F Offline
        farbtoaster
        wrote on last edited by
        #3

        Danke,

        genau das habe ich wohl übersehen in der Doku

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved