Hi, i have i little problem in painting with qt.
This is the situation: i draw my ui application using QTDesigner, so this is my code:
-----myqtapp.h-----
#include "ui_myqtapp.h"
class myQtApp
: public QWidget,
private Ui
::myQtAppDLG{
Q_OBJECT
public:
public slots:
void doSomething();
};
#include "ui_myqtapp.h"
class myQtApp : public QWidget, private Ui::myQtAppDLG
{
Q_OBJECT
public:
myQtApp(QWidget *parent = 0);
public slots:
void doSomething();
};
To copy to clipboard, switch view to plain text mode
-----myqtapp.cpp--------
#include <QtGui>
#include "myqtapp.h"
{
setupUi(this);
connect( btnCrea, SIGNAL( clicked() ), this, SLOT( doSomething() ) );
}
void myQtApp::doSomething()
{
//here i want to paint for example a simple point in my ui. In my UI there is a widget called "widget".
}
#include <QtGui>
#include "myqtapp.h"
myQtApp::myQtApp(QWidget *parent)
{
setupUi(this);
connect( btnCrea, SIGNAL( clicked() ), this, SLOT( doSomething() ) );
}
void myQtApp::doSomething()
{
//here i want to paint for example a simple point in my ui. In my UI there is a widget called "widget".
}
To copy to clipboard, switch view to plain text mode
Can someone help me? i try many solution as QPaint, or creating a new Widget, but nothing...
Thanks
Bookmarks