Reputation: 17118
I've got two push_buttons on dialog and both of them are meant to invoke QFileDialog window, with the difference that first button is for input files and second for output files, other than that logic is the same. What is the best way to connect those buttons to QFileDialog without doing any code repetion.
P.S.
Ideally those two windows (Open File) would have different titles.
Upvotes: 1
Views: 183
Reputation: 2833
IMO you should use two QFileDialog objects, one for each case. To make a difference between imput/output you should set the AcceptMode.
Upvotes: 4