I can't find code examples using Gtk::FileChooserNative
to help me understand how to work with this class. Documentation from here isn't that helpful.
My goal is to create a function which opens a native file chooser dialog and after the user selects the folder, prints the path to the folder into a terminal.
When I try to compile this:
void MyWindow::on_button_browse_clicked()
{
Gtk::FileChooserNative dialog ("Please choose a folder",
Gtk::FileChooser::Action::SELECT_FOLDER,
"Choose",
"Cancel");
}
I get the following error:
error: calling a protected constructor of class 'Gtk::FileChooserNative'
How can I create a Gtk::FileChooserNative
?