Hi,
I am working with Open and Save File dialog and i need to set the size of the fileDialog to fit the LCD Screen 320x240 ?
How do i do it? Please help me
Hi,
I am working with Open and Save File dialog and i need to set the size of the fileDialog to fit the LCD Screen 320x240 ?
How do i do it? Please help me
You won't be able to use the static call if you want to resize the dialog. But if you use the regular QFileDialog class with exec() then before calling exec you can call resize() to resize the dialog to the size you want.
augusbas (4th July 2009)
Hi Wyotsa,
My thanks for your reply.
i tried using resize(320,240) but it didnt worked out
I will put my code just help me, how do i go ahead?
Qt Code:
dialog->getOpenFilename(this,tr("OpenFile"),tr("/root"),tr("AllFiles(*)")); dialog->resize(320,240); dialog->exec();To copy to clipboard, switch view to plain text mode
Help.
Last edited by wysota; 4th July 2009 at 12:02. Reason: missing [code] tags
You can't call getOpenFileName() - it's a static method which you should avoid. You need to setup the dialog properly using the QFileDialog class methods and then call exec().
Here is a minimal example:
Qt Code:
QFileDialog dlg; dlg.resize(320,240); dlg.exec();To copy to clipboard, switch view to plain text mode
augusbas (4th July 2009)
Hi Wysota,
I had a problem with the above file dialog operation.
I am trying to get the file name using "selected file" function when user Opens a file using Open file dialog.
Qt Code:
dlg->setWindowTitle("USB"); dlg->resize(320,200); { }To copy to clipboard, switch view to plain text mode
The above code gets compiled and executed but it doesn't give the file name whatever been selected through file dialog.
Please help.
Last edited by wysota; 7th July 2009 at 10:03. Reason: missing [code] tags
Bookmarks