Hi John,
there is no need to post developer.qt.nokia.com threads to Qt-related
mailing lists.
This particular mailing list is about development of Qt Creator itself,
not developing with Qt Creator, so it is off-topic in this particular
list as well.
Best Regards,
Tobias
On 13.05.2011 14:52, ext john smith wrote:
> Hello,
>
> It is the first time that I am using classes, I am not keen on using
> Qt documentation and I am trying to make my first application. well I
> am using a toolbar and a graphics view, and I want to push the button
> of the toolbar and show the image in the graphics view. But I have a
> problem in how to handle the classes. So far I have written the
> following code but I do not know what to type on the highlighted area.
> Is there anyone who could help me?
>
> Thanks in advance
>
> ////////////// main.cpp ////////////////
> #include "open_image.h"
> #include <QtGui/QApplication>
>
> int main(int argc, char *argv[])
> {
> QApplication a(argc, argv);
> open_image w;
> w.show();
> return a.exec();
> }
>
> ////////// open_image.cpp ///////////
> #include "open_image.h"
>
> open_image::open_image(QWidget *parent, Qt::WFlags flags)
> : QMainWindow(parent, flags)
> {
> setupUi(this);
> QObject::connect(action_Open_File, SIGNAL(triggered()), this,
> SLOT(doThingA()));
> }
>
> open_image::~open_image()
> {
>
> }
>
> void open_image::doThingA(void)
> {
> graphicsView->
>
> }
>
>
>
> //////////////// open_image.h //////////////////
> #ifndef OPEN_IMAGE_H
> #define OPEN_IMAGE_H
>
> #include <QtGui/QMainWindow>
> #include "ui_open_image.h"
>
> class open_image : public QMainWindow, private Ui::open_imageClass
> {
> Q_OBJECT
>
> public:
> open_image(QWidget *parent = 0, Qt::WFlags flags = 0);
> ~open_image();
>
> private:
> Ui::open_imageClass ui;
>
>
> private slots:
> void doThingA(void);
>
> };
>
> #endif // OPEN_IMAGE_H
>
>
>
>
> _______________________________________________
> Qt-creator mailing list
> [email protected]
> http://lists.qt.nokia.com/mailman/listinfo/qt-creator
--
Tobias Hunger
Software Engineer
Nokia, Qt Development Frameworks
Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator