Qt-interest Archive, February 2007
open IGES file in Qt?
Message 1 in thread
Hi,
I want to make an application which opens a IGES file in a Qt
application.
So if anyone have done this earlier and can guide me how I can start it,
then I wil be grateful.
I want to know that what kind of allplication do I need and what viewer
do I need to open such file ina Qt application.
Thanks & Regards,
Shuchi
Message 2 in thread
Suchi, Agrawal (IE10) schrieb:
>
>
> Hi,
>
> I want to make an application which opens a IGES file in a Qt application.
You need code which can parse IGES files - how obvious can the answer be?
As a matter of fact our software simulation does have an IGES importer.
AFAIK we've had that developped or purchased from a 3rd party. So off
course I cannot share it with you.
Google the web and you might be lucky finding source code for such an
importer, or you can write your own when you find the specs. And I'm
sure there are libraries you could purchase as well, in case you are
willing to spend some money.
Off course this is very off-topic here since it has nothing to do with
Qt (IGES is a very application domain specific format, most commonly
used for 3D data exchange between CAD/Simulation software). Maybe you
should ask in a CAD/3D/OpenGL/... user group?
Cheers, Oliver
--
[ signature omitted ]
Message 3 in thread
Consider this replace-all code:
QTextCursor foundAt = NPEditor->document()->find(textToFind,
NPEditor->textCursor().selectionStart(), findHow);
foundAt.beginEditBlock(); // for speed
while (foundAt != QTextCursor())
{
foundAt.insertText(replaceWith);
foundAt = NPEditor->document()->find(textToFind, foundAt, findHow);
}
foundAt.endEditBlock();
It works fine, except that it leaves the QTextEdit in an invalid state:
displaying blank space where the new text should be, until I resize the
window manually or programmatically -- which is a sledgehammer solution.
Things that I've tried without success:
NPEditor->update() and repaint()
NPEditor->document()->markContentsDirty()
NPEditor->setContentsMargins() // to trigger a resizeevent
I assume I'm overlooking something obvious, but what is it?
--
[ signature omitted ]
Message 4 in thread
Forrest wrote:
> It works fine, except that it leaves the QTextEdit in an invalid state:
> displaying blank space where the new text should be, until I resize the
> window manually or programmatically -- which is a sledgehammer solution.
Jiggling the textedit with a setGeometry() also works. An ordinary
hammer, but I want a screwdriver...
--
[ signature omitted ]
Message 5 in thread
>> It works fine, except that it leaves the QTextEdit in an invalid
>> state: displaying blank space where the new text should be, until I
>> resize the window [or edit control] manually or programmatically
>> -- which is a sledgehammer solution.
And, as it turns out, a not entirely effective one. The textedit is
broken after the replace operation -- you can move the cursor out of the
text, causing the insertion point to disappear, at which point you can
mangle the visible text without being able to tell what's happening.
I think this may be a bug...
--
[ signature omitted ]
Message 6 in thread
Forrest wrote:
> The textedit is broken after the replace operation -- you can move the
> cursor out of the text, causing the insertion point to disappear, at
> which point you can mangle the visible text without being able to tell
> what's happening.
Text entered in the Twilight Zone appears upon resizing the window.
Entering it does not set off the textchanged signal.
And clear() does not fix whatever is wrong.
--
[ signature omitted ]