简体   繁体   中英

Custom widget plugin for qt designer is invisible

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM