Results 1 to 4 of 4

Thread: Strange problem

  1. #1
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Thanks
    20
    Thanked 5 Times in 5 Posts
    Qt products
    Platforms
    Unix/X11 Windows

    Question Strange problem

    I tried run my application in qtcreator. Both debug and release mode, and everything is fine. Then, I'm copy C:\Qt\2009.05\qt\bin to D:\ and rename as myapp. I'm copy my application executable and library to D:\myapp. I try for running. But my application not run.

    I must always run qt application in qtcreator ?

    OS. WinXP sp2
    Qt 4.6.0

  2. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Strange problem

    But my application not run.
    Is there a error message ?
    I must always run qt application in qtcreator ?
    Absolutly no.
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  3. #3
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Thanks
    20
    Thanked 5 Times in 5 Posts
    Qt products
    Platforms
    Unix/X11 Windows

    Question Re: Strange problem

    Yes, runtime error.

    But, I think i get the problem. I have a function for check a binary exist on my system or not.

    Qt Code:
    1. bool Olongia::cekB(const QString &name)
    2. {
    3. QStringList env=QProcess::systemEnvironment().filter(QRegExp("^[Pp][Aa][Tt][Hh]="));
    To copy to clipboard, switch view to plain text mode 

    Olongia is base class. Not inherited QObject. Because that i can't get QProcess::systemEnvironment() ?

    Then, i move my function to Dialog class. And everything is fine...

    Qt Code:
    1. bool Dialog::cekB(const QString &name)
    2. {
    3. QStringList env=QProcess::systemEnvironment().filter(QRegExp("^[Pp][Aa][Tt][Hh]="));
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Strange problem

    I cannot imagine this function being dependent on the calling class being a QObject. However since Qt 4.6 it is recommended to use QProcessEnvironment::systemEnvironment() instead of QProcess::systemEnvironment(). Maybe it is related to the issues you are running into.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. MySQL driver - Very strange problem. PLEASE HELP ME. Thanks.
    By diego in forum General Programming
    Replies: 15
    Last Post: 3rd March 2011, 02:33
  2. Replies: 7
    Last Post: 13th August 2009, 17:11
  3. Replies: 2
    Last Post: 2nd June 2009, 15:57
  4. MySQL driver - Very strange problem. PLEASE HELP ME. Thanks.
    By diego in forum Installation and Deployment
    Replies: 0
    Last Post: 2nd June 2009, 02:56
  5. strange problem passing a vector
    By mickey in forum General Programming
    Replies: 15
    Last Post: 22nd November 2007, 10:46

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.