View Full Version : Strange problem
wirasto
27th December 2009, 08:10
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
john_god
27th December 2009, 09:47
But my application not run.
Is there a error message ?
I must always run qt application in qtcreator ?
Absolutly no.
wirasto
27th December 2009, 10:16
Yes, runtime error.
But, I think i get the problem. I have a function for check a binary exist on my system or not.
bool Olongia::cekB(const QString &name)
{
QStringList env=QProcess::systemEnvironment().filter(QRegExp("^[Pp][Aa][Tt][Hh]="));
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...
bool Dialog::cekB(const QString &name)
{
QStringList env=QProcess::systemEnvironment().filter(QRegExp("^[Pp][Aa][Tt][Hh]="));
franz
27th December 2009, 12:24
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() (http://doc.trolltech.com/4.6/qprocessenvironment.html#systemEnvironment) instead of QProcess::systemEnvironment() (http://doc.trolltech.com/4.6/qprocess.html#systemEnvironment). Maybe it is related to the issues you are running into.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.