Qt-interest Archive, December 2007
drawLine() does not work
Message 1 in thread
I use a simple:
widget->get_painter().drawLine (1,1,4,3);
but there is no line in the window. What is the problem?
Mahmood NT
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
--
[ signature omitted ]
Message 2 in thread
Hi Mahmood,
You can only paint within the paintEvent. You should be seeing a debug
warning from Qt.
Regards,
Tony Rietwyk,
> -----Original Message-----
> From: Mahmood NT [mailto:nt_mahmood@xxxxxxxxx]
> Sent: Monday, 31 December 2007 17:47
> To: QT mailing list
> Subject: drawLine() does not work
>
> I use a simple:
>
> widget->get_painter().drawLine (1,1,4,3);
>
> but there is no line in the window. What is the problem?
>
> Mahmood NT
--
[ signature omitted ]
Message 3 in thread
Hi,
>You can only paint within the paintEvent. You should be seeing a debug
>warning from Qt.
I have a function "redraw_win()" which is something like paint event.
Indeed, moveTo() and lineTo() are working. I wonder why drawLinw() does
not work?
P.S: I mistakenly send it to your email!
Mahmood NT
----- Original Message ----
From: Tony Rietwyk <tony.rietwyk@xxxxxxxxxxxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Monday, December 31, 2007 10:35:22 AM
Subject: RE: drawLine() does not work
Hi Mahmood,
You can only paint within the paintEvent. You should be seeing a debug
warning from Qt.
Regards,
Tony Rietwyk,
> -----Original Message-----
> From: Mahmood NT [mailto:nt_mahmood@xxxxxxxxx]
> Sent: Monday, 31 December 2007 17:47
> To: QT mailing list
> Subject: drawLine() does not work
>
> I use a simple:
>
> widget->get_painter().drawLine (1,1,4,3);
>
> but there is no line in the window. What is the problem?
>
> Mahmood NT
--
[ signature omitted ]
Message 4 in thread
On Sun, 2007-12-30 at 23:09 -0800, Mahmood NT wrote:
> Hi,
> >You can only paint within the paintEvent. You should be seeing a debug
> >warning from Qt.
>
> I have a function "redraw_win()" which is something like paint event.
> Indeed, moveTo() and lineTo() are working. I wonder why drawLinw() does
> not work?
"something like paint event"?
That isn't going to work. You can call your own function from within the
paint event, that would be fine. However, it has to be during the paint
event else things aren't going to work.
--
[ signature omitted ]
Message 5 in thread
>"something like paint event"?
>That isn't going to work. You can call your own function from within
the
>paint event, that would be fine. However, it has to be during the paint
>event else things aren't going to work.
I have to say that I use a library which uses QT as GUI. Actually my fault was that I did not call a function that interface the library with QT.
it is now been solved,
Mahmood NT
----- Original Message ----
From: Stephan Rose <kermos@xxxxxxxxxx>
To: Mahmood NT <nt_mahmood@xxxxxxxxx>
Cc: QT mailing list <qt-interest@xxxxxxxxxxxxx>
Sent: Monday, December 31, 2007 12:43:56 PM
Subject: Re: drawLine() does not work
On Sun, 2007-12-30 at 23:09 -0800, Mahmood NT wrote:
> Hi,
> >You can only paint within the paintEvent. You should be seeing a
debug
> >warning from Qt.
>
> I have a function "redraw_win()" which is something like paint event.
> Indeed, moveTo() and lineTo() are working. I wonder why drawLinw()
does
> not work?
"something like paint event"?
That isn't going to work. You can call your own function from within
the
paint event, that would be fine. However, it has to be during the paint
event else things aren't going to work.
--
[ signature omitted ]