PDA

View Full Version : Camera Detection



tiho_bg
18th November 2009, 20:09
Hi everybody

I am working with KDE QMake project using Qt4 under Fedora. I would like to control my camera Canon A530. I made one application trying to control my camera but without success. Could you help me to correct my source code presented below.

My second question is how I can make an executable file under Fedora and use it under Windows?

#include <QtGui>
#include "scan1.h"
#include <QTextEdit>
#include <QTextStream>
#include <QCloseEvent>
#include <QFileDialog>
using namespace Digikam;
scan1::scan1()
{
connectbutton = new QPushButton ("Connect", this);
disconnectbutton = new QPushButton ("Disconnect", this);
connectbutton->setGeometry(0, 50, 150, 30);
disconnectbutton->setGeometry(0, 100, 150, 30);
connect(connectbutton, SIGNAL(clicked()), this, SLOT(gp()));
}
void scan1::gp()
{
camera = NULL;
cameracontrol = NULL;
QString model, port, title, path;
GPCamera::autoDetect(model, port);
camera = new GPCamera(title,model,port,path);
connectbutton->setText("No Camera Connected");
connectbutton->setEnabled(camera-> doConnect());
}