Results 1 to 3 of 3

Thread: using native kde-dialogs

  1. #1
    Join Date
    Aug 2009
    Posts
    3
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default using native kde-dialogs

    I want to use native kde-dialogs, for example 'kdialog --getopenfilename $HOME'
    or kprinter

    The following code does not work:

    QString fileName = QProcess::exectue("kdialog --getopenfilename $HOME");

    error-message: invalid conversion from int to char......

    How can I store the selected filename ?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: using native kde-dialogs

    You have to use something like that:
    Qt Code:
    1. p.start("kdialog", QStringList() << "--getopenfilename" << "$HOME");
    2. p.waitForFinished();
    3. qWarning() << p.readAllStandardOutput();
    To copy to clipboard, switch view to plain text mode 
    or better use the finished signal.

  3. The following user says thank you to Lykurg for this useful post:

    #andi# (9th August 2009)

  4. #3
    Join Date
    Aug 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: using native kde-dialogs

    Or just link against kdelibs and use the API.

Similar Threads

  1. Canceling the getOpenFileName native dialog
    By mclark in forum Qt Programming
    Replies: 1
    Last Post: 14th August 2009, 23:59
  2. Native QFileDialog
    By bgougeon in forum Qt Programming
    Replies: 3
    Last Post: 6th June 2009, 02:33
  3. Native QFileDialog position under Win32
    By no_ghost in forum Qt Programming
    Replies: 0
    Last Post: 28th May 2009, 15:07
  4. Does it use native widgets or imitates?
    By ZuLuuuuuu in forum Newbie
    Replies: 3
    Last Post: 13th May 2009, 08:50
  5. Replies: 4
    Last Post: 4th January 2009, 02:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.