From: Marcus D. H. <ma...@cr...> - 2007-06-19 15:31:06
|
On Tuesday 19 June 2007 16:13:39 Geoffrey Hutchison wrote: > On Jun 19, 2007, at 9:31 AM, Marcus D. Hanwell wrote: > > I was hoping to enhance the autorotate tool by implementing a > > custom widget > > derived from QWidget so that I could update the button text of the > > start/stop > > button. > > Do you need a custom QWidget? What if you simply call setText() on > the button? > http://doc.trolltech.com/4.3/qabstractbutton.html#text-prop > That is what I tried initially - saving the pointer to the button and calling that. The pointer gets set to zero after widget creation though and then cannot be accessed by the tool directly. There is not a setText() slot as there is a setValue() slot for QSlider. > This seems like the best solution IMHO. Granted, I don't know why a > custom QWidget would cause loading problems, but that's a different > issue. :-) > That was what bugged me most - I can't see *why* the tool would not load just because it links to an almost empty class. As I find more features I would like to implement it seems that an inherited QWidget would provide a good solution but I can do most things the way I am currently. Thanks for the suggestion. Marcus PS Someone asking about crystals on my last blog post - seems to have generated a lot of interest :) |