Lazarus
Programming => Widgetset => QT => Topic started by: Fred vS on July 27, 2011, 07:39:46 pm
-
Hello everybody.
I just have recompiled my app from GTK2 to Qt.
But if i ask :
if DirectoryDialog1.Execute then...
It crash the application, before DirectoryDialog1 is show :(
Is there a cure ? :-\
-
I assume then DirectoryDialog1 is TSelectDirectoryDialog. I just tried and works well (all properties are default).
Specify your dialog's properties, I will try it.
-
Hello Mr Blaazen.
Of course it is TSelectDirectoryDialog.
I have the same problem with DirectoryEdit :-\
exception de class 'External: SIGSEGV'.
BF5A52175 movdqa %xmn.....
It appends if i click on the button to change directory.
I have try with a SelectDirectoryDialog original, with no special option, i get the same error.
Does it exist a other component to select directory ?
Thanks
-
In which operating system?
Which qt version do you have?
How have you installed the qt4pascal library? Which version of it do you use?
Can you post a gdb backtrack of the crash? (Search for instructions on the wiki about how to create one)
-
Hello felipemdc
I use Ubuntu 10.10, installed lazarus-ide-qt4-0.9.30_0.9.30-0_i386.deb, lcl-qt4-0.9.30_0.9.30-0_i386.deb,
from Lazarus download.
How have you installed the qt4pascal library?
Hum, it part of the deb Qt no ?
Must i install something else ?
PS If i create a new application, with only a SelectDirectoryDialog,
it load without problems.
PS2 Maybe i have to rewrite the code with ShellListView and ShellTreeView (it do not crash in the application) but it is lot of more work... :-X
Thanks
-
Hum, it part of the deb Qt no ?
Must i install something else ?
He means version of "libQt4pas.so" in /usr/lib.
Didn't you download it from here: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html (http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html) ?
-
Hello Mr Blaazen
He means version of "libQt4pas.so" in /usr/lib.
Does it mean that the user have to install libQt4pas.so if he want to use miXimum compiled with Qt4 ?
Didn't you download it from here: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html ?
No, Is it better ?
I went to the site but, excuse me, the download page is impossible to understand, what must i download, how, ... (why must it be so confused ? :-X)
If you go on the download part of the site you see :
Downloads : Refresh your page (F5) if you have link problems
%) (I have refresh the page, but nothing...)
I have try with a SelectDirectoryDialog original, with no special option, i get the same error.
Does it exist a other component to select directory ?
Ouf, i have use Shelltreeview in place of SelectDirectoryDialog and DirectoryEdit1 and it works like charms.
The only thing i have to change is :
FileListBox1.directory := DirectoryEdit1.Directory
become
FileListBox1.directory := ShellTreeView1.GetSelectedNodePath()
Happy that FileListBox1.directory have no problem in Qt otherwise it gonna be a big work to convert it.
Other thing i see : when loading big graphical procedure (like resize form) it works better if i load the procedure with Try... except...end otherwise i get sometimes a "Duplicate ID error" :-X
By the way, what is that "Duplicate ID error", is it a problem of allocation or what ? I never get that error with GTK2 (but GTK2 works good only for 1 hour !)
Now my opinion : Qt4 is much more fair than GTK2.
If something goes wrong, Qt crash directly the application.
It is much better for debugging.
I have try miXimum compiled with Qt4 with the worst conditions (full effects in sound + equalizer on, stretching the song, playing the graphics in live motion, resizing form while playing songs, mixing songs each 10 seconds and that for hours.)
Of course i get sometimes "Duplicate error id" in beginning of translation but now, with some application.processmessage and try... except..., it works perfectly and faster that GTK2 (and for day-night long).
Im happy :P
Many thanks
Thanks
-
You probably have Qt4pas.so version 2.1 from Ubuntu repositories. If you have problems with it, try another version from mentioned link. There are links below "Downloads" (search for 'V2.4 (Qt 4.5.X, compatible till Qt 4.7.X)' or other, it also depends on your Qt version). I had never problems with dialogs on Qt-lazarus, so I believe it is only wrong combination Qt and bindings.
-
Hello Mr Blaazen, hello everybody.
I had never problems with dialogs on Qt-lazarus
Maybe but i prefer to forget Dialogs and im happy with the new combination ShellTreeView-FileListBox ::)
Now the verdict (i do no talk about the 1 hour problem of GTK2).
I have compiled the same source with GTK2 and Qt.
On the run :
The graphical rendering of Qt is much, much faster than the one of GTK2. (+- 80 % faster).
Really Qt change my view for developing graphics.
GTK2 is much slower vs Win32 (and forget to develop a animation prog with GTK2). Qt can challenge Win32.
And (the most important) Qt is safe and strong. Till now (+-48 hours) miXimum version Qt is working perfectly and fast (miXimum version GTK2 is sleeping for 46 hours already :-X)
You probably have Qt4pas.so version 2.1 from Ubuntu repositories
Yes, maybe...
Is it possible to dynamically load Qt4pas.so, so i can choose a version that i trust, in the directory that i want (/miximum/lib) and incorporate it in the setup ?
Like i do for LibBass.so, the audio lib, (usualy you have to copy it to /usr/lib but i prefer to dynamically load it from /miximum/lib, and so i do not have problems with root protected-folders)
Thanks an bravo to Qt ;)
-
Hum, one more question.
If i compile with Qt, do the user need Qt4pas.so installed on his computer to run it ?
-
Yes. And of course, your users need Qt4 itself or GTK2 with some Qt appearance. The best is KDE4 based linux distribution but many Gnome based distros have in repositories support for Qt applications.
-
OK (hope Ubuntu have it by default, it is the most used...)
Then maybe 2 Linux version, one GTK, one Qt
-
I went to the site but, excuse me, the download page is impossible to understand, what must i download, how, ... (why must it be so confused ? :-X)
Thx for the excuses.
Den Jean
Author Download page ;)
-
@ Mijnheer Den Jean. Zeg, it was only my opinion... :-[
If you want complimenten see here:
http://www.lazarus.freepascal.org/index.php/topic,13893.0.html (http://www.lazarus.freepascal.org/index.php/topic,13893.0.html) ::)
By the way i announce you that the new version of miXimum for Linux with Qt is ready to download (Windows and Mac version too).
You can download it here :
https://sites.google.com/site/fiensprototyping/home (https://sites.google.com/site/fiensprototyping/home)