ebodien
12 years agoContributor
Qt Type Mismatch Error
I am trying evaluate whether a given string will fit in the space provided on the screen. The application uses QT and the QT library has the methodQbounding_Rect. It seems like the following should work:
sub Fit(Target)
'Target = Aliases.Viewer.MainWindow.centralwidget.swMain.pgMainScreen.frmMainControl.lblControl
log.message(Target.QWidget_fontMetrics.QFontMetrics_boundingRect_4(Target.QtText).width)
end sub
However I get a type mismatch error. The QT help states that the paramber must be a QString which I thought was the QtText property. Any suggestions would be appreciated.
sub Fit(Target)
'Target = Aliases.Viewer.MainWindow.centralwidget.swMain.pgMainScreen.frmMainControl.lblControl
log.message(Target.QWidget_fontMetrics.QFontMetrics_boundingRect_4(Target.QtText).width)
end sub
However I get a type mismatch error. The QT help states that the paramber must be a QString which I thought was the QtText property. Any suggestions would be appreciated.