Page 3 of 3 FirstFirst 123
Results 41 to 47 of 47

Thread: kdialog and klocate problems

  1. #41
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: kdialog and klocate problems

    Just make sure the path is correct. Try
    Qt Code:
    1. process->addArgument("redfang-2.5/fang/fang");
    To copy to clipboard, switch view to plain text mode 
    or something like that.

  2. #42
    Join Date
    Apr 2007
    Location
    Valencia, Spain
    Posts
    30
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: kdialog and klocate problems

    The exec file of the program is called "fang" and is directly inside the redfang-2.5 folder. So I put:
    process->arrArgument("redfang-2.5/fang");
    but is nor working, the message is still "proc is not running".
    to run the process directly in the command promp what I have to put is:
    redfang-2.5/fang -n 1 -r %s-%s -t %d

    where %s are two strings and %d is an integer.
    I did this:
    process->addArgument("redfang-2.5/fang");
    process->addArgument("-n");
    process->addArgument("1");
    process->addArgument("-r");
    process->addArgument("0016755116A8");
    process->addArgument("-0016755116AA");
    process->addArgument("-t");
    process->addArgument("5000");
    but still "proc is not running"

  3. #43
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: kdialog and klocate problems

    Please first check what is the current working directory of the application while running. Don't assume you think what it is, just check it. If you can't handle it, just copy or link the application to the directory where your main binary resides.

  4. #44
    Join Date
    Apr 2007
    Location
    Valencia, Spain
    Posts
    30
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: kdialog and klocate problems

    Finally I put the absolute path of the application an It works.......thank you very much for everything.
    I've been thinking about this problem that I had with the path. Is impossible to put the relative path of the program? I tried a lot of different combinations and nothing worked, it only works with the absolute path and this is not really useful for an open source program that will go from one computer to another, isn't it?
    The other question is about lineedits. What you can get from a lineedit is a string, just doing lineedit->text(); but what happens if what I have to get from the lineedit is an integer? Is possible to get an integer as an integer, not as a string, from the lineedit? How?
    Thanks a lot for your help.

  5. #45
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: kdialog and klocate problems

    You can use a path relative to the application path by using QApplication::applicationDirPath()
    As for the integer - convert the string to integer or use a spin box.

  6. #46
    Join Date
    Apr 2007
    Location
    Valencia, Spain
    Posts
    30
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: kdialog and klocate problems

    Hi, I would like to say thank you for everything. Now the project is working perfectly. I would like to thank everyone who have helped me.
    I have to say that when I started the project I had no idea about Qt language but now I know how useful it is and I will try other things with it, other projects.
    Thanks a lot again.

  7. #47
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: kdialog and klocate problems

    Qt language
    Except, there is no Qt language...
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

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.