OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> QFileDialog::getOpenFileName
frogola
post Oct 18 2004, 03:18 PM
Post #1





Group: Members
Posts: 1
Joined: 18-October 04
Member No.: 5,082



I'm a newbie porter, just installed the qtopia sdk and cross compiler libs and tools to port qt apps to the zaurus. My first compile resulted in the following error:

no method `QFileDialog::getOpenFileName'

Is there an alternative to QFileDialog when coding for the zaurus? If so what is it and where is it documented?

Thanks,
-Frank
http://www.inwa.net/~frog/
Go to the top of the page
 
+Quote Post
ashikase
post Oct 18 2004, 05:57 PM
Post #2





Group: Members
Posts: 280
Joined: 17-March 04
From: Osaka, Japan
Member No.: 2,375



frogola:

A lot of classes are disabled in the Zaurus build of Qtopia; this includes QFileDialog.

Sharp includes a library on the Z (libsl) that provides a replacement, SlFileDialog; it has similar functionality (though is not exactly the same). The include files for it, as well as all of Sharp's other classes, can be downloaded from:

http://developer.ezaurus.com/sl_j/doc/refe...20021227.tar.gz
http://developer.ezaurus.com/sl_j/doc/refe...qte.so.2.3.2.gz

(The second file includes an updated libqte file; the one included in the first file is apparently flawed with respect to libjpeg support).

The include files can be found in 'include/sl'. The sdk file also contains copies of the libraries (libqte, libsl, libjpeg, libzdtm) that are used on the Zaurus. If you built the cross-compiler (and thus the libraries) yourself, you should use the library files from the sdk instead, as the sdk libs contain different options (at least, this was the case for me when I tried to use libsl with my own built version of libqte). Another option is to just copy the libraries directly from your Zaurus.

As for (English) documentation, there really isn't a lot available. You can try looking at the slfiledialog.h header file for information. You can also take a look at Opie's implementation of the class, as it should be compatible:

http://dudu.dyn.2-h.org/nist/doxydoc/allOp...FileDialog.html

My program, knQuiz, makes use of SlFileDialog; you can browse the source at the link below (look at kaniquiz.cpp, in the slotLoadFile method):

http://cvs.sourceforge.net/viewcvs.py/niho....23&view=markup

Oh, and please forgive my messy code, it's still a work in progress (^_^;)
(Specifically, ignore the whole 'if (breakCompounds)' section; it has nothing to do with the file dialog).

Hope that helps.

- ashikase
anpachi, gifu, japan
Go to the top of the page
 
+Quote Post
vanstrien
post Oct 21 2004, 06:36 AM
Post #3





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



Ashikase,

I gave the sdk files a go and tried to use them in one of my own apps. I also tried to compile your two apps downloaded from sourceforge. For some reason I get errors on all attempts.

Any suggestions? I copied the files from the SDK into my existing /opt/Qtopia (which came from the qtopia-free rpm).

All my compilaton errors appear to be at the linking stage. And my old apps don't run with the new libs. I'm sure I copied the x86 and sharp libs to the right place.

R,

Michael
Go to the top of the page
 
+Quote Post
ashikase
post Oct 21 2004, 07:18 AM
Post #4





Group: Members
Posts: 280
Joined: 17-March 04
From: Osaka, Japan
Member No.: 2,375



vanstrien: (EDIT: had addressed to wrong person, sorry)

What errors did you get?

Also, your compiler, did you build it yourself or install it from RPMs? If from RPMs, you will probably have two lib directories, /opt/Qtopia/lib and /opt/Qtopia/sharp/lib. The sharp/lib is for cross-compiling... make sure to put the library files in this directory, not /opt/Qtopia/lib.

- ashikase
anpachi, gifu, japan
Go to the top of the page
 
+Quote Post
Mickeyl
post Oct 21 2004, 08:56 AM
Post #5





Group: Members
Posts: 1,497
Joined: 12-November 03
From: Germany
Member No.: 907



Please don't use libsl - it's a one way street and exludes usage on other distributions than SharpROM clones. Don't support proprietary closed source libraries on a PDA using a free operating system when there are alternatives, i.e. there's always the libqpe FileDialog or the libopie2 OFileDialog.
Go to the top of the page
 
+Quote Post
lpotter
post Oct 21 2004, 11:06 AM
Post #6





Group: Members
Posts: 451
Joined: 27-November 03
From: Brisbane, Australia
Member No.: 1,001



QUOTE(frogola @ Oct 19 2004, 09:18 AM)
I'm a newbie porter, just installed the qtopia sdk and cross compiler libs and tools to port qt apps to the zaurus. My first compile resulted in the following error:

no method `QFileDialog::getOpenFileName'

Is there an alternative to QFileDialog when coding for the zaurus? If so what is it and where is it documented?

Thanks,
-Frank
http://www.inwa.net/~frog/

Use FileSelector class in Qtopia. Or, you can also use my fileBrowser class.
You might have to edit this a bit, and could even improve it and send back patches smile.gif

http://handhelds.org/~llornkcor/devZone/fileBrowser.tgz
Go to the top of the page
 
+Quote Post
ashikase
post Oct 21 2004, 06:04 PM
Post #7





Group: Members
Posts: 280
Joined: 17-March 04
From: Osaka, Japan
Member No.: 2,375



QUOTE
there's always the libqpe FileDialog or the libopie2 OFileDialog.


As far as I know, there is no FileDialog available in libqpe; did you mean FileSelector?

QUOTE
Use FileSelector class in Qtopia.


Please, do *not* use FileSelector. FileSelector is designed to search all available media for a given mimetype; for people with large flash cards (like my 4GB microdrive), this search can take ages. Qtopia (version < 1.6) does not provide a way to prevent certain media from being searched (Opie does).

I have not tried OFileDialog; does it do the same kind of media-wide search as FileSelector? Which library is it a part of, libopie1 or libopie2... or both? (What's the difference between the two libraries, anyways?)

- ashikase
anpachi, gifu, japan
Go to the top of the page
 
+Quote Post
Mickeyl
post Oct 22 2004, 01:21 AM
Post #8





Group: Members
Posts: 1,497
Joined: 12-November 03
From: Germany
Member No.: 907



The difference is: libopie1 is old, libopie2 is new smile.gif

Whereas libopie1 was a big pile of junk, libopie2 is functionally split to lighten up dependencies. libopieui2 contains a nice OFileDialog class which is used in some Opie applications.
Go to the top of the page
 
+Quote Post
zenyatta
post Oct 22 2004, 02:24 AM
Post #9





Group: Members
Posts: 366
Joined: 4-November 03
From: Slovakia
Member No.: 850



ashikase:

OFileDialog contains the very cool feature of being able to switch between a filesystem view (files and directories) and a document view (the Qtopia way) on the fly using a simple drop-down. As far as I can tell, the Qtopia mode doesn't scan media at all - it uses information obtained at Opie startup and during media mounts. It also seems to respect the scanning limitations from Settings > Medium Mount. In OZ 3.5.1, you can see this new dialog when setting a Launcher tab background image. I hope it spreads to other applications as soon as possible, it seems to be a really well-thought-out piece of work.

Of course, if you're developing for non-OZ ROMs you'll have to figure out how to get libopieui2 running on your system.

z.
Go to the top of the page
 
+Quote Post
vanstrien
post Oct 22 2004, 05:54 AM
Post #10





Group: Members
Posts: 58
Joined: 22-August 03
From: Houston / London
Member No.: 374



Ashikase,

I'm using the redhat RPMs on Fedora 2. One of my first problems was that I used the tmake.conf that came with the SDK - that messed up all my compiling. I've since corrected that.

With the lib files in /opt/Qtopia/lib, the sharp/lib files in /opt/Qtopia/sharp/lib and the include files in /opt/Qtopia/include I still get errors on the linking stage. Here they are:

CODE
gcc296  -o example main.o example.o moc_example.o  -L/opt/Qtopia/lib -lqpe -lqte
example.o(.text+0x52): In function `mainwidget::mainwidget(QWidget *, char const *, unsigned int)':
: undefined reference to `SlFileDialog::SlFileDialog(bool, QWidget *, char const *, bool, unsigned int)'
example.o(.text+0x5b): In function `mainwidget::mainwidget(QWidget *, char const *, unsigned int)':
: undefined reference to `SlFileDialog::getFileName(void)'
collect2: ld returned 1 exit status
make: *** [example] Error 1


Mickey,

I'm likely to release a version based on OPIE as well, or based on a library that I've half written myself.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 1st September 2014 - 01:05 PM