Results 1 to 11 of 11

Thread: QTDesigner + QPaint [QT 4.4]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default QTDesigner + QPaint [QT 4.4]

    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-----

    Qt Code:
    1. #include "ui_myqtapp.h"
    2. class myQtApp : public QWidget, private Ui::myQtAppDLG
    3. {
    4. Q_OBJECT
    5. public:
    6. myQtApp(QWidget *parent = 0);
    7. public slots:
    8. void doSomething();
    9. };
    To copy to clipboard, switch view to plain text mode 
    -----myqtapp.cpp--------

    Qt Code:
    1. #include <QtGui>
    2. #include "myqtapp.h"
    3. myQtApp::myQtApp(QWidget *parent)
    4. {
    5. setupUi(this);
    6.  
    7. connect( btnCrea, SIGNAL( clicked() ), this, SLOT( doSomething() ) );
    8. }
    9.  
    10. void myQtApp::doSomething()
    11. {
    12. //here i want to paint for example a simple point in my ui. In my UI there is a widget called "widget".
    13.  
    14. }
    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
    Last edited by wysota; 15th November 2008 at 08:57. Reason: missing [code] tags

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.