We are building a new experience for our SmartBear Community. This site is now read-only. You can still browse and search as usual. Learn More
ebodienContributor13 years agoSolvedRead Qt text color in TestCompleteGreetings: I am trying to read the color of text displayed by a Qt application using TestComplete and I'm not having much luck. I've tried multiple auto complete options for the font, palette ...Show MoreTanyaYatskovska13 years ago Hi Eero, Try using the following code: function getColor() { var lbl = Sys.Process("TextColor").QtObject("TextColorClass").QtObject("label"); var role = lbl.QWidget_foregroundRole(); var color = lbl.palette.QPalette_color(role); Log.Message(color.QColor_value()); }
TanyaYatskovska13 years ago Hi Eero, Try using the following code: function getColor() { var lbl = Sys.Process("TextColor").QtObject("TextColorClass").QtObject("label"); var role = lbl.QWidget_foregroundRole(); var color = lbl.palette.QPalette_color(role); Log.Message(color.QColor_value()); }
TanyaYatskovska13 years ago Hi Eero, Try using the following code: function getColor() { var lbl = Sys.Process("TextColor").QtObject("TextColorClass").QtObject("label"); var role = lbl.QWidget_foregroundRole(); var color = lbl.palette.QPalette_color(role); Log.Message(color.QColor_value()); }
TanyaYatskovskaAlumni13 years ago Hi Eero, Try using the following code: function getColor() { var lbl = Sys.Process("TextColor").QtObject("TextColorClass").QtObject("label"); var role = lbl.QWidget_foregroundRole(); var color = lbl.palette.QPalette_color(role); Log.Message(color.QColor_value()); }
Recent DiscussionsTestComplete(TestExecute) 15 asks for license activation almost every dayTestComplete 15.64.3.7 asks for license activation for another RDP user on the same VMFeature Request: Alternative working directory for temp files and logs in TestExecute
Related Contentbackground colorPerformance issue when reading large number of objectshow to read and validate json file using testcomplete