[Solved] Crazy ambiguous thing

I think the problem is absence of const qualifier in QSharedPointer<AbstractDownloadPersistentInfo>argument. So in the first case shared pointer need to go through an extra conversion which turns to be ambiguous. I guess this will be a simplified example. Template constructor of foo makes both variants of bar a viable overloads so ambiguity occurs even though … Read more

[Solved] class->methode1()->methode2() what does it mean? [closed]

class->methode1() returns a pointet to an object that provides a method methode2 you can call immediately. By doing this you create anonymous objects (rvalues if I am not wrong) and you call methods on those objects. You cannl actually say class2 = class1->methode(); and then call class2->methode2(); to achieve the same. (pseudo-code) 5 solved class->methode1()->methode2() … Read more

[Solved] I have 4 days, should I learn QT or Java swing? [closed]

Qt is my vote, too. The examples and info in the links below should get you well on your way to your solution. http://www.youtube.com/watch?v=92biLZST6Vg http://qt-project.org/doc/qt-4.8/phonon-qmusicplayer.html http://qt-project.org/doc/qt-4.8/qfilesystemmodel.html PS, After installing Qt and Qt Creator, it has fantastic documentation and great examples and tutorials easily accessed from the IDE, on the Welcome tab. solved I have 4 … Read more

[Solved] What is the difference between using “::std” or including “using namespace std” in the header?

You are using QString, and QString is not from std namespace. When you directly type std::QString you will get an error, because QString is not defined in std namespace, but when you type using namespace std, You can use everything from std namespace without directly typing std (what is defined in that namespace), but not … Read more

[Solved] index out of range C++/Qt

It means that i >= tanksLevel.size(). Check that. You may want to initialize your list with correct size first or use QList::append instead of operator[]. 2 solved index out of range C++/Qt

[Solved] Qt c++ incorrect class access

You have defined the Test() function in the header for the class coreEng, but failed to implement the class. At the very least, you can put braces at the end of the definition in the header file: – void Test() {} Or implement the function in the cpp void coreEng::Test() { // perform test } … Read more

[Solved] trying to implement the canny edge using opencv on qt creator [closed]

I have made a small changes its perfectly working void MainWindow::edgeImage() { image =cvLoadImage(FileName.toLocal8Bit().data()); Gray = cvCreateImage(cvSize(image->width,image->height),IPL_DEPTH_8U,1 ); cvCvtColor(image, Gray, CV_RGB2GRAY); canny= cvCreateImage(cvSize(image->width,image->height),IPL_DEPTH_8U,1 ); cvCanny(Gray,canny,50,150,3); QImage imgCanny = QImage((const unsigned char*)canny->imageData,canny->width,canny->height,QImage::Format_Indexed8); imgCanny.setPixel(0,0,qRgb(0,0,0)); ui->label_3->setPixmap(QPixmap::fromImage(imgCanny).scaled(ui->label_3->size())); } solved trying to implement the canny edge using opencv on qt creator [closed]

[Solved] Why does Qt use arrow syntax? [closed]

This isn’t a choice of Qt, but the way proper design in C++ works. -> dereferences a pointer to an object to access a member of it. Passing a pointer around tends to be the cleanest method of access to an object. solved Why does Qt use arrow syntax? [closed]