Re: SaveFile-Dialog

Florian Erfurth <[email protected]>
Newsgroups gmane.comp.handhelds.opie.devel
Message-ID <[email protected]>
Sybren Stüvel schrieb:
> On Mon, Dec 04, 2006 at 05:49:19AM +0100, Florian Erfurth wrote:
>   
>> I did try with QFileDialog (#include <qfiledialog.h>:
>>     
>
> Ok, _Q_FileDialog
>
>   
>> QString fileName = OFileDialog::getSaveFileName( this , , "newfile.txt", );
>>     
>
> Here you use _O_FileDialog.
>
>   
>> speech2textImpl.cpp:16: error: `OFileDialog' undeclared (first use this
>>   function)
>>     
>
> And once you've seen that, this error message seems to make sense ;-)
>   
I forgot to tell that I did comment out the inlcludeline qfiledialog.h 
and use #include <opie2/ofiledialog.h> if I use OFileDialog. Then I get 
such Error message. So it should be ok, but why does it not work?
>> void speech2textImpl::SaveText_slot()
>> {
>> 	QMessageBox::information( this, "Speech2Text Info", "Under Construction", QMessageBox::Ok );
>>
>> QString fileName = OFileDialog::getSaveFileName( this , , "newfile.txt", );
>>
>> /*
>> 	QString fileName = OFileDialog::getSaveFileName( "newfile.txt", "Textfiles (*.txt)", this );
>>
>> 	QString fileName = QFileDialog::getSaveFileName( "newfile.txt", "Textfiles (*.txt)", this );
>> 	if ( !fileName.isNull() )
>> 	{
>>         	//file saved
>> 	} else {
>> 		//file not saved
>> 	}
>> */
>> }
>>     
>
> There you go. You used to write QFileDialog, then moved to
> OFileDialog. Quite easy to miss, especially late at nigh ;-)
>   
So what is wrong here? If I use QFileDialog then I use the include 
qfiledialog.h, after givining up I use OFileDialog with 
opie2/qfiledialog.h. (Like you can see in speech2textImpl.cpp in 
attachment.)

cu Floh
_______________________________________________

http://opie.handhelds.org/cgi-bin/moin.cgi/DeveloperWikiIndex

Opie-devel mailing list
[email protected]
https://handhelds.org/mailman/listinfo/opie-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.