[mythtv] Image is a null image
Stuart Morgan
stuart at tase.co.uk
Wed Aug 27 11:13:05 UTC 2008
On Wednesday 27 August 2008 11:11:21 Alvaro Gonzalez Sola wrote:
> When use image on MythUIB uttonListItem constructor
>
> I recibe this Exception
>
> QImage::scaled: Image is a null image
>
> This is my code:
>
> //add all channel on m_channels
> for (Channel *program = m_channels.first(); program; program =
> m_channels.next())
> {
> MythImage *image = GetMythPainter()->GetFormatImage();
> QString imgFile = program->channelDir() + "/logo";
>
> if(QFile::exists(imgFile)){
> image->Load(imgFile);
> MythUIButtonListItem* item =
> new MythUIButtonListItem(m_channelList,
> program->name(),image);
> item->setData(program);
> }
> else{
> MythUIButtonListItem* item =
> new MythUIButtonListItem(m_channelList, program->name());
> item->setData(program);
> }
> }
>
> If not exist "logo" i call MythUIButtonListItem without image but
> painter return exception ¿why?
> This don't appear only if all item don't has image.
>
> What can I do?
It's just a hunch, but try changing it to:
new MythUIButtonListItem(m_channelList, program->name(), image, false);
--
Stuart Morgan
More information about the mythtv-dev
mailing list