Recent

Author Topic: [SOLVED] BGRABitmap - can't compile on QT  (Read 5882 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1048
[SOLVED] BGRABitmap - can't compile on QT
« on: February 06, 2012, 03:53:17 pm »
Hi,

I have stable BGRABitmap 5.5, Lazarus 0.9.31 snapshot (from a week) and stable FPC 2.6.0. Lazarus is built with QT widgetset. When I try install bgrabitmap package I get error:
Quote
/bgrabitmap/bgraqtbitmap.pas(147,52) Error: identifier idents no member "Handle"
It stops on this condition:
Code: Pascal  [Select][+][-]
  1.   {$warning QT: recheck this}
  2.   if (dcSource.vImage <> nil) and (dcSource.vImage.Handle <> nil) then
  3.   begin
  4.     // we must stop painting on device
  5.     B := QPainter_isActive(dcDest.Widget);
  6.     if B then
  7.       QPainter_end(dcDest.Widget);
  8.     TQtImage(bmp.Handle).CopyFrom(dcSource.vImage.Handle,
  9.       SrcX, SrcY, Width, Height);
  10.     if B then
  11.       QPainter_begin(dcDest.Widget, TQtImage(bmp.Handle).Handle);
  12.   end;        
dcSource.vImage is TQTImage and in my LCL QT source, there is no Handle property in this class.

Regards
« Last Edit: February 06, 2012, 10:24:47 pm by Dibo »

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: BGRABitmap - can't compile on QT
« Reply #1 on: February 06, 2012, 05:29:19 pm »
QT version is very experimental, but it has already been compiled. Maybe it depends on Qt version. If you can find the right way to code it, and if you can test it, it would be wonderful. If you have any question about how TBGRABitmap works in general, please feel free to ask for more information.
Conscience is the debugger of the mind

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRABitmap - can't compile on QT
« Reply #2 on: February 06, 2012, 06:23:52 pm »
I think I fixed that, but I must test it first

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRABitmap - can't compile on QT
« Reply #3 on: February 06, 2012, 10:08:14 pm »
Ok, it seems that fix works. It needs patch for Lazarus LCL QT widgetset. I posted it here:

http://bugs.freepascal.org/view.php?id=21235

Regards.

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: [SOLVED] BGRABitmap - can't compile on QT
« Reply #4 on: February 07, 2012, 07:51:56 pm »
Patch accepted and commited on SVN. So only latest Lazarus snapshot is needed to install BGRABitmap on QT widgetset.

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: [SOLVED] BGRABitmap - can't compile on QT
« Reply #5 on: February 08, 2012, 04:31:50 pm »
Thanks a lot !  :)
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018