Results 1 to 20 of 23

Thread: Call Constructor within Designer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Call Constructor within Designer

    It does a matter, because after the constructor the sizeHint() function is called.
    The sizeHint() function should return the size of the image, otherwise the function returns 0x0 (width x height). At this point the sizeHint() returns 0x0, because the image is defined after the sizeHint() call.

    So if i call a function then the following are done:
    Qt Code:
    1. MyButton();
    2. sizeHint()
    3. setPressed(QPixmap pressed);
    4. setNormal(QPixmap normal);
    To copy to clipboard, switch view to plain text mode 

    I need to set the image before the sizeHint() function is called.
    So I thought the best way is the constructor.

    Regards
    NoRulez
    Last edited by NoRulez; 22nd June 2009 at 16:54.

Similar Threads

  1. designer not showing menu items ...
    By wagmare in forum Installation and Deployment
    Replies: 0
    Last Post: 24th February 2009, 10:26
  2. wwwidgets.how can it be brought into designer as plugin
    By sh123 in forum Installation and Deployment
    Replies: 1
    Last Post: 21st February 2009, 12:56
  3. Replies: 13
    Last Post: 15th December 2006, 11:52
  4. Designer crashes when selecting some widgets
    By gwendal in forum Qt Tools
    Replies: 4
    Last Post: 21st July 2006, 13:18
  5. How to create custom slot in Qt Designer 4.1?
    By jamadagni in forum Qt Tools
    Replies: 31
    Last Post: 18th January 2006, 20:46

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
  •  
Qt is a trademark of The Qt Company.