<<xAct`xTerior`
$DefInfoQ=False;
$UndefInfoQ=False;

DefManifold[Man,4,{a,b,c,d,e,f,i,j,k,l,m,n,r,s}];
DefMetric[{1,3,0},metricg[-a,-b],cd,Torsion->False,PrintAs->"g"]
DefVBundle[VB,Man,3,{A,B,C,D}]

DefDiffForm[Q[-a,-b],Man,1,PrintAs->"Q"]

UseDimensionStart[]
SignatureOfMetric@metricg^={3,1,0};
SlotsOfTensor@epsilonmetricg^={-TangentMan,-TangentMan,-TangentMan,-TangentMan};
SymmetryGroupOfTensor@epsilonmetricg[a_,b_,c_,d_]^=Antisymmetric[{1,2,3,4},Cycles];

$CVVerbose=False;
coords={t[],x1[],x2[],x3[]};
DefChart[flrw,Man,{0,1,2,3},coords,FormatBasis->{"Partials","Differentials"},ChartColor->RGBColor[0,0,1]]

DefScalarFunction[sf,PrintAs->"a"];
componentsmetricg=DiagonalMatrix[{-1,sf[t[]]^2,sf[t[]]^2,sf[t[]]^2}];

FLRWmetric=componentsmetricg;
FLRWmetric=CTensor[FLRWmetric,{-flrw,-flrw}];
SetCMetric[FLRWmetric,flrw,SignatureOfMetric->{3,1,0}];

componentsQ=DiagonalMatrix[{0,-a'[t[]]/a[t[]] Diff@coords[[1]],-a'[t[]]/a[t[]] Diff@coords[[1]],-a'[t[]]/a[t[]] Diff@coords[[1]]}];

AllComponentValues[Q[-{a,flrw},-{b,flrw}],componentsQ];
AllComponentValues[metricg[-{a,flrw},-{b,flrw}],componentsmetricg];
AllComponentValues[metricg[{a,flrw},{b,flrw}],Inverse@componentsmetricg];

the following works fine:

Q[-a,-b]
ToValues@TableOfComponents[TraceBasisDummy@ToBasis[flrw]@%,flrw]
Hodge[metricg]@%
%/.metricg->FLRWmetric
ExpandHodgeDual[%,dx[Man],FLRWmetric]
ToValues@%

but this one, however, not :

Hodge[metricg][Q[-a,-b]]
%/.metricg->FLRWmetric
ToBasis[flrw]@%
ToValues@TableOfComponents[%,flrw]
ToBasis[flrw]@%