[Interest] QFileDialog Qt5

Jan Dasselaar jan at altus-escon.com
Thu Dec 17 09:15:10 CET 2015


On 16-12-2015 15:02, Duane wrote:
> On 16/12/2015 8:53 AM, Thiago Macieira wrote:
>> On Wednesday 16 December 2015 08:10:44 Duane wrote:
>>> I'm subclassing a QFileDialog.  I need to get a pointer to the filename
>>> box.  I was doing this with findChild<QLineEdit*>() with Qt4 but with
>>> Qt5 this returns null.  Any suggestions?
>>
>> XY problem. Why do you need to get the pointer to the line edit? What 
>> are you
>> trying to do?
>>
>
> Not sure what you mean by XY problem.
>
> We're trying to do something like a "save as" where depending on the 
> setup the user can enter a filename with the directory path. We block 
> the context menu that allows creating new files etc.
You can also use the setOptions(QFileDialog::ReadOnly) flag.
When set the Rename, Delete and New Folder items in the context menu 
will be disabled.

Jan
>
> Is there a way to get the user's entry when the file doesn't exist and 
> the user clicks the ok button?
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>




More information about the Interest mailing list