Probably you may trap paint event and draw it yourself. there are some samples in c++ but it MAY work in harbour too... never tried....
Actually there may be a solution:
GRID is based on QTableWidget, so we may use as cells both QTableWidgetItem (that is a quick and easy to use cell) or full blown QWidget...
I'm looking at GRID code and it seems to me that something should be changed... but I'm gonna ask you...
Ricci, you can use QWidget and setCellWidget... create a QLabel, set the icon, set the qlabel as cell...
2011-10-26 14:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
* samples/window.main/demo_3.prg
* to show usage of ShowObjectsTree() method
* source/hmg.hbp
* enabled errorsys.prg compilation
* source/hmgapp.prg
+ ShowObjectsTree() method to printout current objects structure.
* source/errorsys.prg
; it doesn't handle errors. must be used hbqt_errorsys() - hbqt error
handler - at program startup.
+ ERRLOG() class to create/write a html file. Will be used to show errors
or to show internal environment. Please read notes inside source.
+ source/xdummy.prg
* THIS FILE SHOULD NOT BE INCLUDED DURING LIBRARY COMPILATION.
It's only used as a container for unused code.
* source/misc.prg
* source/errorsys.prg
* removed unused code about error handling. the related code is moved
into xdummy.prg
Hi, I found a little problem about menuitem. The Checked() method doesn't return item checked status. It seems that the Qt .....:IsChecked() method doesn't work properly....
2011-10-27 09:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
! source/menuitem.prg
! problem with Checked() method. The Qt ....:IsChecked() method seems not
work. Now Checked() method uses the ::lChecked var to returns the
item check status.
Hi friends.
Many thanks to Ricci for his help and contribution
* If Stretch is .T.: AspectRatio and Smoothing can be changed
* If ScaledWidth is .T. AND ScaledHeight is .T.: Smoothing can be changed; AspectRatio can't be changed but Qt function respect. Scaled upon image dimensions: portrait or landscape
* If ScaledWidth is .T. AND ScaledHeight is .F.: Smoothing can be changed; AspectRatio can't be changed but Qt function respect.
* If ScaledWidth is .F. AND ScaledHeight is .T.: Smoothing can be changed; AspectRatio can't be changed but Qt function respect.
* If Image size is LESS then canvas: nothing to do ELSE will be scaled and AspectRatio and Smoothing can be changed
2011-10-28 13:20 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
+ samples/image/demo_4.prg
+ samples/image/demo_4.hbp
+ samples/image/demo_4.qrc
+ samples/image/fantasy.jpg
+ samples/image/rogue.jpg
+ samples/image/sea.jpg
* to show usage
! source/bitmap.prg
! a general fixing about source code. to increase the speed, the image
is loaded: when the object is created or when Picture() method is used.
By default Stretch is .T. to keep HMG3 compatibility. This means image
is scaled to the canvas (QLabel container) size and keep aspectratio.
+ AspectRatio() to keep (default Qt_KeepAspectRatio) or
not (Qt_IgnoreAspectRatio)
+ Smoothing() to manage transformation fast (default Qt_FastTransformation)
or smoothing (Qt_SmoothTransformation)
+ ImageWidth() to know the real width of the loaded image
+ ImageHeight() to know the real height of the loaded image
2011-10-28 15:05 UTC+0100 Francesco Perillo ( fperillo at gmail.com )
* source/basic.prg
* adapted to changes in window class names
* include/hmg.ch
* typo
* implemented FIELDS command for GRID
Hi guys,
please rem out from hmgapp.prg the line
#include "hmg_qtlocale.ch"
(and delete from the repository the hmg_qtlocale.ch file itself).
as his content it's already defined in hbqtcore.ch.
It's a change planned by Luigi.
Thanks.
Best regards.
Maurizio
Hi Maurizio.
Many thanks for this notice.
I can do this change, but HMG4 packages (it contains previous Harbour version) must be update before.
Please, Rathinagiri, can you do this changes and then create a new HMG4 packgage with update Harbour?
You should make these changes:
- remove line 37 ( #include "hmg_qtlocale.ch" ) from hmgapp.prg
- remove include/hmg_qtlocale.ch file
- remove include/hmg_qtimage.ch file
for all those who download HARBOUR yourself, you make the changes described above and recompile HMG4 library.
All QLocal* definitions are within hbqtcore.ch.
All QImage* definitions are within hbqtgui.ch (I found usefull to create transparent image using QPaint)
All QTextOption* definitions are within hbqtgui.ch (I think not used by HMG4 but usefull for adding option in editbox)