Problem with QLabel and <img src="...">

thread: 2 messages  |  last: a year ago  |  started: monday, april 5, 2010, 11:00 am pdt


#1  |  Mattia Bagiella (Switzerland) Switzerland
Monday, April 5, 2010, 11:00 AM PDT

I have a little problem, I change all my QImageButton with QLabel and now instead of the picture I have “<img src='...'> :(((


<?php

$this
->colImg = new QDataGridColumn(QApplication::Translate('Image'), '<?= $_FORM->ImgColumn_Render($_ITEM) ?>''Width=200''HtmlEntities=false');

$this->dtgLangue->AddColumn($this->colImg);


public function 
ImgColumn_Render(Langue $objLangue) {
    if ((
$objLangue->Id == $this->intEditLangueId) ||
       ((
$this->intEditLangueId == -1) && (!$objLangue->Id)))
       return 
$this->txtImg->RenderWithError(false);
    else{
error_log($this->intEditLangueId);
       if(!
$objLangue->Img) return QApplication::HtmlEntities($objLangue->Img);
       
$imgLangue = new QLabel($this->dtgLangue);
       
$imgLangue->Text "<img src='".$objLangue->Img."'>";
       return 
$imgLangue->Render(false);
    }
}

?>

.bc
#2  |  Mattia Bagiella (Switzerland) Switzerland
Monday, April 5, 2010, 11:43 AM PDT

Your problem is very simple to solve

just add : HtmlEntities = false;

:O



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.