Page 2 of 2 FirstFirst 12
Results 21 to 35 of 35

Thread: busy progress bar without thread ?

  1. #21
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: busy progress bar without thread ?

    Which Qt version are you using? I recall seeing a bug in the past that with some specific style that you had to set a value != 0 to make the busy indicator to work.
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    bmn (4th December 2008)

  3. #22
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: busy progress bar without thread ?

    I am using Qt4

  4. #23
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: busy progress bar without thread ?

    Quote Originally Posted by bmn View Post
    I am using Qt4
    Well, that's not very exact definition. The first version of Qt 4 was released a few years ago. There have been quite a few minor and patch version upgrades since then. What is the exact version eg. 4.x.y? Which style are you using? You can see the bug situation in the task-tracker.
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    bmn (4th December 2008)

  6. #24
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: busy progress bar without thread ?

    Quote Originally Posted by jpn View Post
    Well, that's not very exact definition. The first version of Qt 4 was released a few years ago. There have been quite a few minor and patch version upgrades since then. What is the exact version eg. 4.x.y? Which style are you using? You can see the bug situation in the task-tracker.
    QMake version 2.01a
    Using Qt version 4.2.1 in /usr/lib/qt4/lib

  7. #25
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: busy progress bar without thread ?

    Quote Originally Posted by bmn View Post
    QMake version 2.01a
    Using Qt version 4.2.1 in /usr/lib/qt4/lib
    The current stable version of Qt is 4.4.3. Probably it's time to upgrade. Anyway, have you tried the trick setting the value to something != 0? And again, which style you are using?
    J-P Nurmi

  8. The following user says thank you to jpn for this useful post:

    bmn (4th December 2008)

  9. #26
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: busy progress bar without thread ?

    Quote Originally Posted by jpn View Post
    The current stable version of Qt is 4.4.3. Probably it's time to upgrade. Anyway, have you tried the trick setting the value to something != 0? And again, which style you are using?
    Default Style
    this is the test
    Qt Code:
    1. int main(int argc, char *argv[]){
    2. QApplication app(argc, argv);
    3. QMainWindow window;
    4. QProgressBar* progressBar = new QProgressBar(&window);
    5. progressBar->setMaximumHeight(16);
    6. progressBar->setMaximumWidth(200);
    7. progressBar->setTextVisible(false);
    8. progressBar->setMaximum(0);
    9. progressBar->setMinimum(0);
    10. progressBar->setValue(1); // ??? don't move the bar
    11. window.statusBar()->addPermanentWidget(progressBar);
    12. window.statusBar()->showMessage("Loading");
    13. window.show();
    14. app.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 4th December 2008 at 20:57. Reason: missing [code] tags

  10. #27
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: busy progress bar without thread ?

    First of all, could you finally start using appropriate [code] tags, please? I already sent instructions to you.

    Secondly, the "default style" depends on the environment. The following piece of code prints out which style is the default style for you:
    Qt Code:
    1. qDebug() << app.style()->objectName();
    To copy to clipboard, switch view to plain text mode 
    You can try different styles by passing it as a command line argument:
    bash Code:
    1. ./myapp -style windows
    To copy to clipboard, switch view to plain text mode 
    You can try different styles like "windows", "plastique", "cleanlooks" etc. Does any of them work?
    Last edited by wysota; 3rd January 2009 at 00:20.
    J-P Nurmi

  11. The following user says thank you to jpn for this useful post:

    bmn (4th December 2008)

  12. #28
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: busy progress bar without thread ?

    Quote Originally Posted by jpn View Post
    First of all, could you finally start using appropriate [code] tags, please? I already sent instructions to you.

    Secondly, the "default style" depends on the environment. The following piece of code prints out which style is the default style for you:
    Qt Code:
    1. qDebug() << app.style()->objectName();
    To copy to clipboard, switch view to plain text mode 
    You can try different styles by passing it as a command line argument:
    bash Code:
    1. ./myapp -style windows
    To copy to clipboard, switch view to plain text mode 
    You can try different styles like "windows", "plastique", "cleanlooks" etc. Does any of them work?
    Sorry i will start to use code!!

    My default style is cleanlooks, change to windows and WORKS, but, only with windows style.
    I will try to set windows style as default
    thanks!!
    Last edited by wysota; 3rd January 2009 at 00:21.

  13. #29
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: busy progress bar without thread ?

    So you're probably hit by this bug: QProgressBar "busy indicator" mode doesn't work in Cleanlooks style. It was fixed in Qt 4.3.0. So updating to a recent version of Qt would help as suggested earlier.
    J-P Nurmi

  14. The following user says thank you to jpn for this useful post:

    bmn (4th December 2008)

  15. #30
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: busy progress bar without thread ?

    Quote Originally Posted by jpn View Post
    So you're probably hit by this bug: QProgressBar "busy indicator" mode doesn't work in Cleanlooks style. It was fixed in Qt 4.3.0. So updating to a recent version of Qt would help as suggested earlier.
    Thanks *JPN*
    I use Red Hat system, i will try update may qt!!!

    Thanks again!!!

  16. #31
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: busy progress bar without thread ?

    I update my qt4.2.1 version to qt4.4.3,
    I did:
    qmake -project
    qmake myproject.pro
    make

    WORKS!

    but,
    I try to play and happens

    ./mypoject: undefined symbol: _ZN10QBoxLayout10setSpacingEi

    And now?? What do I do?

    thanks angain,

  17. #32
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: busy progress bar without thread ?

    Make clean and rebuild.
    J-P Nurmi

  18. The following user says thank you to jpn for this useful post:

    bmn (5th December 2008)

  19. #33
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: busy progress bar without thread ?

    I did:
    make clean
    make

    on eclipe appears:

    /home/alexwell/workspace/smartcardtools/Debug/SmartCardTools: symbol lookup error: /home/alexwell/workspace/smartcardtools/Debug/SmartCardTools: undefined symbol: _ZN10QBoxLayout10setSpacingEi

  20. #34
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Re: busy progress bar without thread ?

    Thanks *JPN* !!!

    I remove all qts and reinstall, now its working...

    Thanks again...

  21. #35
    Join Date
    Jan 2009
    Posts
    53
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: busy progress bar without thread ?

    It works for me in Qt 4.5.1's QProgressBar.

    Just set progressBar.setMinimum(0); progressBar.setMaximum(0); in the designer works for me. The progressBar.value would be -1 automatically in designer.

    Hope this helps.

Similar Threads

  1. Problem closing a QMainWindow in Qt4.2
    By ian in forum Qt Programming
    Replies: 11
    Last Post: 17th October 2006, 01:49
  2. simple thread layout question
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 12th August 2006, 12:02
  3. Replies: 11
    Last Post: 7th July 2006, 14:09
  4. [QT4] QThread and printing a QList<QPixmap>
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2006, 22:44
  5. Replies: 2
    Last Post: 6th January 2006, 22:15

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.