Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] qt4 refresh

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
ravloony
n00b
n00b
User avatar
Posts: 54
Joined: Fri Feb 04, 2005 11:21 pm
Location: France
Contact:
Contact ravloony
Website

[SOLVED] qt4 refresh

  • Quote

Post by ravloony » Thu Feb 05, 2009 4:08 pm

Hi all,

I am writing a quick and dirty gui using qt4 for a project I'm working on.

I need to iterate through a folder of pngs and display them, either in a sort of impromptu animation, or step by step.
So my question is: How do I get a QLabel to refresh its contents?

I have a QLabel called label, and I set its Pixmap using

Code: Select all

label->setPixmap(QPixmap("pic1.png"));
Resetting the pixmap seems to work if I do it once in a function, but not if I do it in a loop- it only refreshes the display after the loop is ended.

I can't find any information on this on the net for some reason.

Any thoughts?
Last edited by ravloony on Thu Feb 05, 2009 11:22 pm, edited 1 time in total.
No sig yet, sig ebuild up soon :-)
Top
szczerb
Veteran
Veteran
Posts: 1709
Joined: Sat Feb 24, 2007 9:54 pm
Location: Poland => Lodz

  • Quote

Post by szczerb » Thu Feb 05, 2009 4:39 pm

Didn't try but a quick search in the docs suggests that you're looking for the Repaint or Update function inherited from QWidget.
Top
ravloony
n00b
n00b
User avatar
Posts: 54
Joined: Fri Feb 04, 2005 11:21 pm
Location: France
Contact:
Contact ravloony
Website

  • Quote

Post by ravloony » Thu Feb 05, 2009 11:21 pm

Thanks a lot!
repaint() worked great. Of course it seems so obvious now...

Cheers!
No sig yet, sig ebuild up soon :-)
Top
szczerb
Veteran
Veteran
Posts: 1709
Joined: Sat Feb 24, 2007 9:54 pm
Location: Poland => Lodz

  • Quote

Post by szczerb » Fri Feb 06, 2009 3:05 am

ravloony wrote:Thanks a lot!
repaint() worked great. Of course it seems so obvious now...

Cheers!
Yeah.....it kinda is :twisted:
Top
Post Reply

4 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic