Results 1 to 3 of 3

Thread: QDesigner Crash when attempting to use a ported Qt3 Custom widget

  1. #1
    Join Date
    Jan 2008
    Posts
    26
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy QDesigner Crash when attempting to use a ported Qt3 Custom widget

    Hello again,

    First of all, thanks to everyone. I find this Forum very very useful !

    Secondly, I'm trying to use a Qt3 custom widget in QDevelop under Qt4.

    The plugin compiles perfectly, it just generates the .dll and .a files and then I put them under the Qt plugins directory. When I enter QDesigner, the C Widget appears in the designer widget toolbox , but then I open a new project, click over the widget and QDesigner crashes... (just by clicking over the widget)

    What am I missing? Maybe it crashes because I am not specifying any .rc (resources) file?

    I attach 2 files, the plugin .h and .cpp files.

    Thanks!
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDesigner Crash when attempting to use a ported Qt3 Custom widget

    Qt Code:
    1. QWidget *MyCanvasViewPlugin::createWidget(QWidget *parent)
    2. {
    3. //IconEditor a = new IconEditor(parent);
    4. QWidget* a;
    5. return a;
    6. }
    To copy to clipboard, switch view to plain text mode 
    This is incorrect. You return an invalid pointer to a widget instead of a real widget.

  3. The following user says thank you to wysota for this useful post:

    degs2k4 (8th February 2008)

  4. #3
    Join Date
    Jan 2008
    Posts
    26
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Smile Re: QDesigner Crash when attempting to use a ported Qt3 Custom widget

    Oh! I missed that... just copying and pasting all the time....

    THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!

Similar Threads

  1. Custom widget
    By zorro68 in forum Qt Programming
    Replies: 7
    Last Post: 28th January 2008, 14:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.