Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Change time and date settings manually
Qt 6.11 is out! See what's new in the release blog

Change time and date settings manually

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    rapid84
    wrote on last edited by
    #1

    Hi,
    I want to change the local time and date settings manually. For this i want to use a widget like that time edit and date edit, but how can i set the time and date with them?

    1 Reply Last reply
    0
    • ValentinMicheletV Offline
      ValentinMicheletV Offline
      ValentinMichelet
      wrote on last edited by ValentinMichelet
      #2

      I'll need some extra information here:

      • What is the aimed OS?
      • Do you need it to be cross-platform?
      • Will you share this code with people, or is it only a personal project?
      R 1 Reply Last reply
      0
      • ValentinMicheletV ValentinMichelet

        I'll need some extra information here:

        • What is the aimed OS?
        • Do you need it to be cross-platform?
        • Will you share this code with people, or is it only a personal project?
        R Offline
        R Offline
        rapid84
        wrote on last edited by rapid84
        #3

        @ValentinMichelet

        OS is a debian., yes i need to cross compile. For the 3rd question , i just want to learn how to do it and it will be a personal project.

        1 Reply Last reply
        0
        • ValentinMicheletV Offline
          ValentinMicheletV Offline
          ValentinMichelet
          wrote on last edited by ValentinMichelet
          #4

          The question has already been discussed here for Linux:
          https://forum.qt.io/topic/31115/solved-how-to-change-date-and-time-in-linux-system-based-from-qt-based-application/7

          And here for Windows:
          http://stackoverflow.com/questions/3742880/change-system-date-on-windows-using-qt

          I don't know about Mac, but anyway, you will have to use #if.
          Just to be clear, Qt is not meant to change time settings, you will have to use OS specific API.

          1 Reply Last reply
          0

          • Login

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