Results 1 to 4 of 4

Thread: Binding FileDialog folder to property

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Binding FileDialog folder to property

    The "folder" property is very likely set by the dialog if you change the folder, which overwrites the initial binding.

    Why the commented line fixes that I don't know, usually it would be required to reset the binding, e.g. using Qt.binding().

    Cheers,
    _

  2. #2
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Binding FileDialog folder to property

    The "folder" property is very likely set by the dialog if you change the folder, which overwrites the initial binding.
    Not sure I understand you correctly. The thing is the dialog uses the initial value of the folder property regardless of what directory I navigated to and regardless of the new value of this property. For example, in my case the folder property is initialized with the value "file:///d:/temp". Then I open a file from the directory "z:/", the property is updated to "file:///z:/", but when I open the dialog again it still points to "d:/temp". So I can't understand what the dialog sets and why.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Binding FileDialog folder to property

    Ah, interesting.

    I guess it is an "input only" property then, assuming that the developer changes it if necessary.

    Cheers,
    _

Similar Threads

  1. Replies: 3
    Last Post: 2nd April 2016, 11:46
  2. property binding in a repeater
    By sedi in forum Qt Quick
    Replies: 6
    Last Post: 2nd April 2015, 07:45
  3. Replies: 1
    Last Post: 21st August 2013, 23:23
  4. Dynamic QML Property Binding
    By EMCEE in forum Qt Quick
    Replies: 1
    Last Post: 30th August 2012, 11:51
  5. QML Property Binding update does not propagate
    By bluestreak in forum Qt Quick
    Replies: 0
    Last Post: 21st August 2012, 19:24

Tags for this Thread

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.