Results 1 to 2 of 2

Thread: Controlling Property Setting Order

  1. #1
    Join Date
    Jul 2009
    Thanked 1 Time in 1 Post

    Default Controlling Property Setting Order

    I have an issue where I have a widget that exposes a text property. The value of that text property is the text property of a label that is embedded in my widget. My problem is that, when the .ui file is moc'd, the generated calls for my widget to set that property come before the label is created, so the designer (and runtime version of the app) will crash. Is there some way to force the moc process to generate the property set call after the label has been generated?

  2. #2
    Join Date
    Jan 2006
    Thanked 52 Times in 52 Posts
    MacOS X Unix/X11

    Default Re: Controlling Property Setting Order

    No there is not. Your widget is supposed to be fully initialized in the constructor. You can also check inside the setter of your property whether the label is already alive and if not, do the initialization before setting the label's text.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Replies: 2
    Last Post: 27th May 2010, 02:55
  2. Replies: 7
    Last Post: 18th September 2009, 11:59
  3. setting tab order on MAC
    By gren15 in forum Qt Tools
    Replies: 0
    Last Post: 3rd July 2009, 22:08
  4. Setting Tab order
    By Rakesh_Kumar in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2009, 05:58
  5. Controlling which widget on top layer?
    By JonathanForQT4 in forum Qt Programming
    Replies: 6
    Last Post: 22nd March 2007, 15:27


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.