Results 1 to 4 of 4

Thread: Editing and updating UI properties on the fly

  1. #1
    Join Date
    Nov 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Editing and updating UI properties on the fly

    Hi, I'm writing a program where the user can right click on a widget (such as a dial) and change the value of its initial settings (i.e., change initial value, tool tips, min max, etc), and then update the windows UI file, reflecting those changes.

    Is there a high level call to accomplished this? Or does Qt have some other way of doing it?

    thanks!

  2. #2
    Join Date
    Apr 2010
    Location
    Minsk, Republic of Belarus
    Posts
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Editing and updating UI properties on the fly

    You may use qtpropertybrowser from qt-labs.
    Download it, find in example 'objectcontroller'.
    Create QWidgetAction, set 'objectcontroller' widget for it.
    Create QMenu, add QWidgetAction to it;
    Catch contextMenuEvent for your widgets, set selected widget to 'objectcontroller' and show QMenu.

  3. #3
    Join Date
    Nov 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Editing and updating UI properties on the fly

    I tried using the QFormBuilder::save() function, but the resulting .ui file was bad. The output was different than the original .ui file for the form.

    I've looked at that property editor before, and i'm not a big fan of it...

  4. #4
    Join Date
    Apr 2010
    Location
    Minsk, Republic of Belarus
    Posts
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Editing and updating UI properties on the fly

    I don't know fast way to save widget and its children properties into *.ui file.
    You may enumerate property for all your widgets and save it into your file format (or QSettings).

Similar Threads

  1. dynamic properties
    By Hogwarts in forum Qt Programming
    Replies: 1
    Last Post: 3rd May 2010, 16:37
  2. Properties Window
    By manti_madhu in forum Qt Programming
    Replies: 3
    Last Post: 30th October 2009, 09:30
  3. Editing properties of groups of widgets
    By Dusdan in forum Qt Tools
    Replies: 2
    Last Post: 18th August 2006, 12:51
  4. ViewPort Properties
    By Kapil in forum Qt Programming
    Replies: 6
    Last Post: 23rd March 2006, 11:57
  5. QAxWidget Properties
    By ToddAtWSU in forum Newbie
    Replies: 1
    Last Post: 13th February 2006, 17:45

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.