## Building GUIs With Fusion's UI Manager

Midgardsormr
Fusionista
Posts: 997
Joined: Wed Nov 26, 2014 8:04 pm
Location: Los Angeles, CA, USA
Been thanked: 46 times
Contact:

### Re: Building GUIs With Fusion's UI Manager

SecondMan wrote:
Fri Jun 22, 2018 8:27 am
Just out of interest, why would you not want a window to be resizable?

I have the same question about Resolve's Inspector pane!

In my case, I have a window that contains the MuseVFX logo, and I want to make sure that the logo is always fully visible and maintains a proper hierarchical relationship with the rest of the window, so I set min and max bounds on the window. I had it set with a fixed width at first, but the data I was displaying very occasionally overflowed, so I relaxed it.

Tags:

Nick Verlinden
Posts: 8
Joined: Thu Apr 12, 2018 5:29 am

### Re: Building GUIs With Fusion's UI Manager

Just want to do some polishing on my scripts, usually I'm creating dialogs to perform a task with some checkboxes or comboboxes. The window gets ugly when you resize it ( buttons get really stretched etc.).

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### Re: Building GUIs With Fusion's UI Manager

Midgardsormr wrote:
Fri Jun 22, 2018 10:11 am
I have the same question about Resolve's Inspector pane!

Quoted for agreement.

AndrewHazelden
Fusionator
Posts: 1260
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Been thanked: 28 times
Contact:

### Re: Building GUIs With Fusion's UI Manager

SecondMan wrote:
Fri Jun 22, 2018 10:39 am
Midgardsormr wrote:
Fri Jun 22, 2018 10:11 am
I have the same question about Resolve's Inspector pane!

Quoted for agreement.

Double quoted for even more agreement.

Midgardsormr
Fusionista
Posts: 997
Joined: Wed Nov 26, 2014 8:04 pm
Location: Los Angeles, CA, USA
Been thanked: 46 times
Contact:

### Re: Building GUIs With Fusion's UI Manager

PeterLoveday wrote:
Tue Sep 05, 2017 3:22 am
Tree:
• ItemPressed
ItemClicked *
ItemDoubleClicked
ItemActivated
ItemEntered
ItemChanged
ItemExpanded
ItemCollapsed
CurrentItemChanged
ItemSelectionChanged

I'm having some trouble with some of these events. ItemClicked, ItemDoubleClicked, and CurrentItemChanged all work. I'm not sure what the difference is between ItemClicked and ItemPressed, but I can't figure out what I'd need to do to activate the latter. I'm not working with child items, so I'm not sure about ItemExanded and ItemCollapsed. None of the others—ItemActivated, ItemEntered, ItemChanged, and ItemSelectionChanged—activate. According to the Qt documentation:

doc.qt.io wrote: void QTreeWidget::itemChanged(QTreeWidgetItem *item, int column)
This signal is emitted when the contents of the column in the specified item changes.

http://doc.qt.io/qt-5/qtreewidget.html#itemChanged

That's the signal I'd really like to use.

LightWolf
Posts: 18
Joined: Tue Mar 06, 2018 5:18 am
Location: Germany
Contact:

### Re: UI Manager Based Open File and Folder Dialogs

AndrewHazelden wrote:
Tue Sep 19, 2017 7:24 am
Fusion 9.0.1+ has added a pair of new file/folder requester functions that open a file dialog. These UI elements work nicely at replacing the final AskDialog features of the FileBrowse and PathBrowse tags so you can build a 100% UI Manager based GUI in Fusion for your pipeline tools.

Edit: The Fusion 9.0.2 release has improved the reliability of the fu:RequestFile() / fu:RequestDir() functions on MacOS/Linux/Win.
I've found that fu:RequestFile() only works if you select an existing file (Tested on Win10 here), do you know if there's a way to let the user define a non-existing file name?

Cheers,
Mike

PeterLoveday
Fusioneer
Posts: 143
Joined: Sun Sep 14, 2014 6:09 pm
Been thanked: 12 times

### Re: Building GUIs With Fusion's UI Manager

Try fu:RequestFile(path, file, { FReqB_Saving = true })

LightWolf
Posts: 18
Joined: Tue Mar 06, 2018 5:18 am
Location: Germany
Contact:

### Re: Building GUIs With Fusion's UI Manager

PeterLoveday wrote:
Tue Jul 24, 2018 8:01 am
Try fu:RequestFile(path, file, { FReqB_Saving = true })
Neat, that's working as expected. Thanks Peter.

Cheers,
Mike

Midgardsormr
Fusionista
Posts: 997
Joined: Wed Nov 26, 2014 8:04 pm
Location: Los Angeles, CA, USA
Been thanked: 46 times
Contact:

### Re: Building GUIs With Fusion's UI Manager

Midgardsormr wrote:
Tue Jul 17, 2018 3:45 pm

I'm having some trouble with some of these events. ItemClicked, ItemDoubleClicked, and CurrentItemChanged all work. I'm not sure what the difference is between ItemClicked and ItemPressed, but I can't figure out what I'd need to do to activate the latter. I'm not working with child items, so I'm not sure about ItemExanded and ItemCollapsed. None of the others—ItemActivated, ItemEntered, ItemChanged, and ItemSelectionChanged—activate. According to the Qt documentation:

Glaah! Thanks, @SecondMan for reminding me in another thread that I need to add the event to the tree in order for them to work. ItemChanged works just fine. Now I just need to figure out how to make only one of the columns read-only…

roger
Posts: 2
Joined: Wed May 02, 2018 4:27 am

### Re: Building GUIs With Fusion's UI Manager

PeterLoveday wrote:
Tue Jul 24, 2018 8:01 am
Try fu:RequestFile(path, file, { FReqB_Saving = true })

Is there any way to find all the possible parameters, or are we at the mercy of insiders releasing this type of info?

I'm trying to set a default file extension for the RequestFile popup when FReqB_Saving is enabled. I can see there are some exciting FReq parameters in fusionsystem.dll (on Windows), but without a header file it's difficult to figure it out. I've found stuff like FReqS_Filter, FReqS_AllTypes and FReqS_DefExtension but haven't yet been able to successfully combine them through guesswork.

joergmark
Fusioneer
Posts: 52
Joined: Sat Jan 03, 2015 1:59 am
Location: Marxzell, Germany
Been thanked: 1 time
Contact:

### Re: Building GUIs With Fusion's UI Manager

hi, is it possible to change the background color of a row in the tree component?

and is there a complete dokumentation somewhere?

Midgardsormr
Fusionista
Posts: 997
Joined: Wed Nov 26, 2014 8:04 pm
Location: Los Angeles, CA, USA
Been thanked: 46 times
Contact:

### Re: Building GUIs With Fusion's UI Manager

No to complete documentation. This thread is the best you'll find so far. Yes to changing the background color of a row. Let me just dig that up…

Here's a line from one of my functions where I'm setting the background color of field 3 in a particular row:

Code: Select all

		item.BackgroundColor[3] = value

The color needs to come in as a table in this format:

Code: Select all

{R = 0.21, G = 0.6, B = 0.7, A = 1}

SirEdric
Fusionator
Posts: 1731
Joined: Tue Aug 05, 2014 10:04 am
Real name: Eric Westphal
Been thanked: 77 times
Contact:

### Re: Building GUIs With Fusion's UI Manager

This might be interesting as well:
viewtopic.php?f=6&t=2426#p18799

tomjohnab32
Posts: 5
Joined: Thu Sep 20, 2018 8:25 pm

### Re: Building GUIs With Fusion's UI Manager

In the Building GUIs With Fusion's UI Manager - We Suck Less.html lists some GUI element controls, one of the examples of controls for ui:TabBar{}, please give me an example of the usage of the TabBar control, thank you!

SirEdric
Fusionator
Posts: 1731
Joined: Tue Aug 05, 2014 10:04 am