Showing posts with label Qt Creator. Show all posts
Showing posts with label Qt Creator. Show all posts

Tuesday, August 26, 2014

Solved: Failed to start program. Path or permissions wrong?

Got this error in Qt: "Failed to start program. Path or permissions wrong?" after adding a new drive in our linux developer image in VM-Ware and moving our trunk to it. According to a lot of resources on the Internet the cause should be that the user don't have execute permission. But the user did and there were no difference when using root.

Found out that it was possible to check if mount was set to: noexec by using mount command and it was noexec although according to the GUI in mountmanager it was exec.
http://forum.softpedia.com/topic/980864-probleme-cu-permisiuni-folder/

Found out that this issue could be solved by doing a remount:
sudo mount -o remount,exec /tmp
http://askubuntu.com/questions/311438/how-to-make-tmp-executable

After the remount the error disappeared.

Friday, February 14, 2014

Solved: error: no match for call to '(QString) (QString&)' when emitting signal in Qt

I had an annoyning error message:
error: no match for call to '(QString) (QString&)'
when compiling my qt application.

Took some time before I found what was wrong, the code looked like this:
QString newValue=QString::number(value,'g',1);

if(newValue != value_)
{
    value_ = newValue;
    emit newValue(value_);
}



The error is that the signal name is the same as the variable:
QString newValue=QString::number(value,'g',1);

if(newValue != value_)
{
    value_ = newValue;
    emit newValue(value_);
}


So the fix is easy, changed the signal name:
QString newValue=QString::number(value,'g',1);

if(newValue != value_)
{
    value_ = newValue;
    emit updateValue(value_);
}