Results 1 to 3 of 3

Thread: sending localsystem time through port

  1. #1
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question sending localsystem time through port

    i want to send the local system time through the serialport.i used below command
    port->write(QDateTime::toString(Qt::LocalDate).toAscii( ));

    i am getting this error while compiling,

    main.cpp:658: error: cannot call member function `QString QDateTime::toString(Qt
    :ateFormat) const' without object


    i tried in many ways,but am not getting the clear idea regarding this,please assist me,

    thanks in advance.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: sending localsystem time through port

    It's port->write(QDateTime::currentDateTime().toString(Qt::L ocalDate).toAscii( ));

  3. #3
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: sending localsystem time through port

    hi marcel,
    thanx for ur kind response.i got the result,
    cheers :-)
    bye.

Similar Threads

  1. qt network performance
    By criss in forum Qt Programming
    Replies: 16
    Last Post: 24th July 2006, 09:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.