Not sure this is the only problem...
Virtualgrid crashes when tabbed. And this don't occur all times, when more code with other controls are present it may occur or not.
Test this code:
Code: Select all
#include "hmg.ch"
FUNCTION Main
LOCAL aRowsVirtual [1000] [7]
LOCAL i
LOCAL oWindow
LOCAL oTab1
LOCAL oVirtualGrid
LOCAL oTimer
HbQt_ErrorSys()
FOR i := 1 TO 1000
aRowsVirtual[i] := {STR(i),1000.00,DATE(),.T.,DATE(),12,1}
NEXT i
DEFINE WINDOW oWindow
Width 700
Height 620
Title 'Problem Demo!'
DEFINE TAB oTab1 ROW 5 COL 5 Width 690 Height 610
DEFINE PAGE 'VirtualPageGrid'
DEFINE VIRTUALGRID oVirtualGrid
Width 680
Height 580
ColumnWidths {150,60,70,40,90,40,100}
ColumnHeaders {'Column 1','Column 2','Column 3','Column 4','Column 5','Column 6','Column 7'}
Items aRowsVirtual
ColumnControls {{'TEXTBOX','CHARACTER'},;
{'TEXTBOX','NUMERIC','9,999.99'},;
{'TEXTBOX','DATE'},;
{'CHECKBOX','Yes','No'},;
{"DATEPICKER","UpDown"},{"SPINNER",1,1000},;
{"COMBOBOX",{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}};
}
END VIRTUALGRID
END PAGE
END TAB
END WINDOW
oWindow:Activate()
RETURN NIL
It crashes at
VirtualGrid:Refresh() when calling
::oQTObject:setModel( ::QAbstractItemModel ).
If tab and page are removed it runs Ok.