Results 1 to 5 of 5

Thread: Status Widget

  1. #1
    Join Date
    Jan 2007
    Posts
    92
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Status Widget

    Guys,

    I am looking for something (widget or animated class )that I can use to show the busy status on main screen. For instance I have some process going on the background (copy some data to removable device) but I want to display user some kind of screen that process is currently busy..I can use progress bar to show the progress status. Is there any widget besides QProgressbar or other way to display some sort of animation on screen. I tried to set Pixmap on the label on main screen but I want to keep moving that pixmap. As soon I get status back from background process I want to stop or hide that animation. Something like spinner ?

    Thanks.

  2. #2
    Join Date
    Feb 2008
    Posts
    60
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Status Widget

    you can use QMoviie to show the animated gif.

    Qt Code:
    1. QLabel label;
    2. QMovie *movie = new QMovie("sample.gif");
    3. label.setMovie(movie);
    4. movie->start();
    To copy to clipboard, switch view to plain text mode 
    you can stop the gif animation using stop().

    Hope this helps.
    Last edited by jpn; 18th June 2008 at 17:25. Reason: missing [code] tags

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Status Widget

    Or you can make your own widget !!
    You will have much power and control. You can -
    1) show circles
    2) scrolling text
    3) anitmation (QMovie/ gif)
    u can think more, i bet

  4. #4
    Join Date
    Jan 2007
    Posts
    92
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Re: Status Widget

    Thanks guys for replying. I am using Qt3 ..Do I have to setMovie in loop. because if movie will stop after few seconds or minutes once clip will end..how do I keep continue playing that .mng movie. I will also try with creating my own widget.

  5. #5
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Status Widget

    in Qt3, you can "connect" to
    QMovie::connectStatus(Interesting alternative to having signals... was not aware of that.)

    just connect it to some slot of yours, check if the new status is EndOfLoop or so and restart.
    (Have not tried it, but should work.)

    HTH

Similar Threads

  1. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. Custom widget
    By zorro68 in forum Qt Programming
    Replies: 7
    Last Post: 28th January 2008, 14:06
  4. Controlling which widget on top layer?
    By JonathanForQT4 in forum Qt Programming
    Replies: 6
    Last Post: 22nd March 2007, 14:27
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.