![]() Registered Member ![]()
|
I just starting programing using kdelibs/qt. What is the name of class with folder tree selector, something like in kdialog when you run kdialog --getexistingdirectory ~ ? How can I add such a widget to GUI? I haven't found it in qt designer.
Can modedarors move this to Libraries & API? I've posted it in this category by mistake.
Last edited by isander on Thu May 28, 2009 12:25 pm, edited 1 time in total.
|
![]() KDE Developer ![]()
|
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Is there any widget like folder selector, which I can embed into my program? |
![]() Administrator ![]()
|
You may find this class of help: http://api.kde.org/4.x-api/kdelibs-apid ... idget.html
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
It would be used to select directory, so something like KDirSelectDialog would be better, but in form of widget. I have searched something like that but there isn't any widget form of KDirSelectDialog.
In a nutshell I need the KDirSelectDialog, but with additional controls. Is there any other way to aim this without coping whole kdirselectdialog.cpp and adding few lines of code in it's constructor?
Last edited by isander on Wed Jun 10, 2009 3:59 pm, edited 1 time in total.
|
![]() Administrator ![]()
|
Yes, you can instantiate KDirSelectDialog, then call mainWidget() on it, since it is a subclass of KDialog, which will return the widget used by the dialog. Note that it will be extremely messy however.
The KDirSelectDialog documentation for selectDirectory() recommends using KFileDialog instead however. I would recommend using KFileWidget and setting a directory filter on it. What is the specific reason for needing to add custom widgets to the selection dialog? I can't see how directory selection would need anything specific...
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I want to write sound converter run using kde service menu. On the dialog there would be some controls to choose output format, bitrate etc and the widget to choose localisation of output file(s). If the user run the program on multiple files it would be better to show something as KDirSelectDialog rather than KFileWidget.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]