Results 1 to 3 of 3

Thread: How to keep the main window activately

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default How to keep the main window activately

    Hi, all
    My program has a main window and a progressBar in it to shown the progress.
    The progressbar was connected with an thread object called A.
    In main window, I call a subfunction in object A that read data from the hardware interface continuously ( in a loop).
    In object A, after read the data, it emits a signal with the reading data.
    In main window, the slot function get this signal and data, display on progressbar.
    The problem is that during it running, when I click outside the main window (the main window becomes deactivate), the progressbar was stopped until the call function was finished (after reading all data).
    I use QT4.5, in debugging environment, the program works well. But without debugger mode, it always stick until the end of calling.

    Does any one has any idea for it?

    I have tried several ways but can't deal it. It seems the signal was emit but stopped at somewhere or because of the main window deactivate? And I have use DirectConnection option, doesn't work.
    I try to keep main window activate, such as set up window state through a timer, does't work too.
    please help

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to keep the main window activately

    read this.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  3. #3
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to keep the main window activately

    quit useful article
    thanks a lot

Similar Threads

  1. Main window
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2009, 11:46
  2. Replies: 11
    Last Post: 11th August 2008, 09:14
  3. Replies: 15
    Last Post: 23rd March 2007, 16:16
  4. Getting main window to run.
    By Doug Broadwell in forum Newbie
    Replies: 5
    Last Post: 17th October 2006, 23:56
  5. Main window
    By Michiel in forum Qt Tools
    Replies: 1
    Last Post: 20th March 2006, 23:54

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.