Hi,
I am using Qt5.2 & QtCreator 3, and my class in inherit from QDialog having some widget(ie push button) which open other dialog.
How to draw continuous infinite line in main Dialog which should not be effected if we pressed any push button.
Hi,
I am using Qt5.2 & QtCreator 3, and my class in inherit from QDialog having some widget(ie push button) which open other dialog.
How to draw continuous infinite line in main Dialog which should not be effected if we pressed any push button.
By reimplementing the widget's paintEvent() and using QPainter API to draw.
Apparently you did something wrong. Hard to say what without seeing any of your code.
Maybe the dialog's construction takes considerable time and occupies the main thread too long.
You could try creating the dialog at startup or before showing the main UI and then show/exec the already existing dialog instance when needed.
Cheers,
_
Kindly let me know in my case it's recommended in qt to draw wave in label or have any alternate solution?
Thanks both of you..It's working now
Hi,
I am facing strange problem, I used QImage for drawing wave.Mouse clicked not working on button but keyboard event working.
On keyboard enter button click, wave stuck for a while.PFA & let me know the solution for smooth drawing.
Last edited by Girish1483; 31st January 2014 at 09:57. Reason: updated contents
Hi experts,
Kindly do the needfull for the same.
You are creating a layout for WaveDraw but forget to add the two frames that contain the buttons.
You are also lucky that QThread::msleep() is a static method, because WaveDraw::thread() returns the thread that owns the WaveDraw object, which is the main thread.
You do not have any synchronization on access to the data shared between the two threads.
Cheers.
_
Hi anda_skoa,
Kindly let me know the solution for smooth drawing in same code.
I have no idea what you mean, the drawing seems to work fine.
Cheers,
_
Hi anda_skoa,
I used QImage for drawing wave.Mouse clicked not working on button but keyboard event working.
On keyboard enter button click, wave stuck for a while.Please find Attachment for updated WaveDraw.zip file.
I also used a separate thread class,problem is still remain same.Kindly let me know the solution for smooth drawing.
Last edited by Girish1483; 10th February 2014 at 09:24.
Bookmarks