tags:

views:

815

answers:

1

I've tried to create a custom widget plugin for QT Designer following this (http://doc.trolltech.com/4.3/designer-creating-custom-widgets.html) tutorial and was somewhat successful. Basically, I can place my new widget in Designer, but it doesn't draw (I get an empty square instead of whatever I try to draw in my paintEvent method, I started with some custom code but reverted to copy pasting from the tutorial when that didn't work).

While placing the custom widget my system log fills up with:

full_path/Designer: CGAffineTransformInvert: singular matrix.

Any suggestions?

I have built the example plugin that came with the qt sdk and there were no problems.

+1  A: 

Hi,

without the source it's very hard to help you. Further I would prefer Qt 4.4 - it's much more reliable and faster.

Here some common problems/hints:

  • your DLL / .so file is not in /plugins/designer/
  • you have a buggy paint() method
  • your app or lib is missing some libs

Can you post your paint method?

ciao, Chris

3DH
It was a problem with the paint method, thanks! Sorry for the slow response, didn't have time to look at this.
Dan O
The exact problem: I'd defined a couple constants like #define foo 3 instead of #define foo 3.0 (ints instead of doubles)
Dan O
No problem ;) Good to see that it works now.Regards
3DH