[Qt-interest] How to draw a line on the mainwindow
Jaco Naude
naude.jaco at gmail.com
Tue Feb 10 15:14:23 CET 2009
Not sure if I understand exactly what you are asking, but in my case I'm
using an .ui class as well:
#include <ui_ContentsMainWidget.h>
class MDIAreaWidgetOverlay;
class VariableWorkspaceContentsMainWidget : public QWidget, public
Ui_VariableWorkspaceContentsMainWidget
{
Q_OBJECT
public:
VariableWorkspaceContentsMainWidget(QWidget* parent=0);
~VariableWorkspaceContentsMainWidget();
void repaintOverlay();
protected:
void resizeEvent(QResizeEvent *event);
MDIAreaWidgetOverlay* widgetOverlay;
}
and the class' constructor:
VariableWorkspaceContentsMainWidget::VariableWorkspaceContentsMainWidget(QWidget*
parent) :QWidget(parent)
{
setupUi(this);
widgetOverlay = new MDIAreaWidgetOverlay(this);
}
The above works fine for me.
Hope it helps,
Cheers
Jaco
On Tue, Feb 10, 2009 at 3:59 PM, chandrasekar wagmare <
sekarwagmare at gmail.com> wrote:
> its a nice example but how can we over write when using UI class by using
> setupUi
>
>
> On Tue, Feb 10, 2009 at 12:53 PM, Ender EREL <erelender at yahoo.com> wrote:
>
>> try calling update() after a state change, it will post a paint event to
>> the event queue and schedule a repaint.
>>
>> --
>> ender
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
>
> --
> CHANDRU
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090210/650fccca/attachment.html
More information about the Qt-interest-old
mailing list