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. wxWidgets Timer - Qt version
Forum Updated to NodeBB v4.3 + New Features

wxWidgets Timer - Qt version

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 138 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.
  • A Offline
    A Offline
    Aeroplane123
    wrote on 23 Dec 2022, 08:59 last edited by
    #1

    Hello all, can anyone tell me how I can get similar functionality in Qt for the following wxWidgets code... (I don't have wxWidgets avaiable) - Is there a similar Timer functionality in Qt?

    const long Widget::ID_TIMER1 = wxNewId();
    
    Connect(ID_TIMER1,wxEVT_TIMER,(wxObjectEventFunction)&Widget::OnTimer1Trigger);
    

    And then the function...

    void Widget::OnTimer1Trigger(wxTimerEvent& event){
    
    
    //some code...
    
    }
    
    

    What is the equivalent in Qt?

    Thanks

    J 1 Reply Last reply 23 Dec 2022, 09:00
    0
    • A Aeroplane123
      23 Dec 2022, 08:59

      Hello all, can anyone tell me how I can get similar functionality in Qt for the following wxWidgets code... (I don't have wxWidgets avaiable) - Is there a similar Timer functionality in Qt?

      const long Widget::ID_TIMER1 = wxNewId();
      
      Connect(ID_TIMER1,wxEVT_TIMER,(wxObjectEventFunction)&Widget::OnTimer1Trigger);
      

      And then the function...

      void Widget::OnTimer1Trigger(wxTimerEvent& event){
      
      
      //some code...
      
      }
      
      

      What is the equivalent in Qt?

      Thanks

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 23 Dec 2022, 09:00 last edited by
      #2

      @Aeroplane123 https://doc.qt.io/qt-6/qtimer.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3

      1/2

      23 Dec 2022, 08:59

      • Login

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