![]() ![]() |
Apr 6 2004, 07:07 PM
Post
#1
|
|
![]() Group: Members Posts: 191 Joined: 16-March 04 From: Indianapolis Member No.: 2,346 |
Another question for Qtopia experts...
I'm trying to use a QFileDialog and hitting my head against a wall...it has to be obvious... I keep getting compile errors: zgscore.cpp: In method `void ZGS::Print()': zgscore.cpp:259: no method `QFileDialog::getSaveFileName' zgscore.cpp:259: warning: unused variable `class QString fileName' make: *** [zgscore.o] Error 1 Here is the code: void ZGS::Print() { QString fileName = QFileDialog::getSaveFileName( "/tmp/zgscore.txt", "Textfiles (*.txt)", this, "save file dialog", "Choose a filename to print report" ); /* do something with fileName here */ } Here is the class: class ZGS : public ZGSBase { Q_OBJECT public: ZGS( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~ZGS(); protected: private slots: void Print(); }; I've included <qfiledialog.h> so that's not the problem, what could be the deal? Thanks in advance. |
|
|
|
Apr 7 2004, 12:58 AM
Post
#2
|
|
|
Group: Members Posts: 1,497 Joined: 12-November 03 From: Germany Member No.: 907 |
Welcome to the wonderful world of Qt/Embedded, where features are optional
Qt/Embedded in the Qtopia/Opie configuration defines QT_NO_FILESELECTOR hence does not contain the QFileSelector. Read qfileselector.h which explains why you can include that file but don't get any symbols. |
|
|
|
Apr 7 2004, 04:03 AM
Post
#3
|
|
![]() Group: Members Posts: 191 Joined: 16-March 04 From: Indianapolis Member No.: 2,346 |
Ok, so if I can't use QFileDialog, is there a quick/dirty way to do this?
|
|
|
|
Apr 7 2004, 04:33 AM
Post
#4
|
|
|
Group: Members Posts: 1,497 Joined: 12-November 03 From: Germany Member No.: 907 |
#include <qpe/filedialog.h> and use that.
|
|
|
|
Apr 8 2004, 07:38 PM
Post
#5
|
|
|
Group: Members Posts: 78 Joined: 28-January 04 From: clovis CA USA Member No.: 1,580 |
Also look at the FileDialog included in the application "Just Reader" created by Dmitri Skachkov. He has the application released under GPL and it may be more suited for a PDA. As I recall it looked pretty good.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 03:25 AM |