Results 1 to 14 of 14

Thread: use Qtimer in gui application with some thread at background

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2012
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: use Qtimer in gui application with some thread at background

    it does not work again....
    here is my code... whats the problem?

    QTimer::singleShot(2000, this, SLOT(fake()));


    void MainWindow::fake()
    {
    int a;
    a++;

    }

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: use Qtimer in gui application with some thread at background

    This code does not do anything so how do you know it doesn't work?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QTimer in a worker thread
    By inger in forum Newbie
    Replies: 6
    Last Post: 2nd November 2012, 12:37
  2. qtimer in console application
    By JeanC in forum Newbie
    Replies: 10
    Last Post: 31st March 2011, 15:30
  3. QTimer doesnt work or complains about thread
    By daemonna in forum Qt Programming
    Replies: 3
    Last Post: 1st September 2010, 16:00
  4. Replies: 9
    Last Post: 28th November 2009, 20:31
  5. QTimer - too many in application??
    By db in forum Newbie
    Replies: 4
    Last Post: 31st March 2008, 15:12

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
  •  
Qt is a trademark of The Qt Company.