Search found 33 matches

by liguosheng
Tue Apr 26, 2016 3:33 am
Forum: QCAD Developers and Contributors
Topic: RPolylineEntity cann't be selected? why?
Replies: 1
Views: 2024

RPolylineEntity cann't be selected? why?

in the function of mouseMoveEvent(QMouseEvent* event),RPolylineEntity cann't be selected by the following code: RMouseEvent e(*event, *scene, *this, getDevicePixelRatio()); RDocumentInterface *di = getDocumentInterface(); REntity::Id entityId = di->getClosestEntity(e); entityId is null, but other en...
by liguosheng
Fri Apr 22, 2016 8:07 am
Forum: QCAD Developers and Contributors
Topic: spline is lost when fitPoints is setted,Why?
Replies: 1
Views: 1955

spline is lost when fitPoints is setted,Why?

spline can be created by controlpoints, but when it's fitPoints is setted, the spline is unvisible,but control points exist still, Why?

the fitPoints of class RSpline can not be used?
by liguosheng
Sat Mar 26, 2016 10:30 am
Forum: QCAD Developers and Contributors
Topic: Paste is exception
Replies: 0
Views: 2571

Paste is exception

the actions of copy and cut are ok, when i paste the elentities by using the following code: RPasteOperation *op = new RPasteOperation(getDocument()->getClipboard()); finally, the class of Rdocumentinterface is used to apply the operation by the following: getDocumentInterface()->previewOperation(op...
by liguosheng
Mon Mar 21, 2016 12:01 pm
Forum: QCAD Developers and Contributors
Topic: how can judge a block entity
Replies: 14
Views: 4812

Re: how can judge a block entity

on qcad3, after the file is opened, when i select 'edit block from reference', the block cann't be selected.
by liguosheng
Mon Mar 21, 2016 11:46 am
Forum: QCAD Developers and Contributors
Topic: how can judge a block entity
Replies: 14
Views: 4812

Re: how can judge a block entity

Block and RBlockReferenceEntity are created by selection,when i set current block by the following code: di->setCurrentBlock(strName); only entities belong to block are showed on view. my meaning is:i want to select a block by selecing a entity if it's a part of block. That is it: edit block from re...
by liguosheng
Mon Mar 21, 2016 11:05 am
Forum: QCAD Developers and Contributors
Topic: how can judge a block entity
Replies: 14
Views: 4812

Re: how can judge a block entity

the value -1 is returned when cursor is over the line of a body by getClosestEntity, if the entity isn't a part of a block, the value is normal by getClosestEntity.
by liguosheng
Mon Mar 21, 2016 10:44 am
Forum: QCAD Developers and Contributors
Topic: how can judge a block entity
Replies: 14
Views: 4812

Re: how can judge a block entity

if an entity isn't a block, it's ok, the entity can be selected. the return value isn't -1.
when i create a block, i cann't select it by mouseMoveEvent or mousePressEvent.
by liguosheng
Mon Mar 21, 2016 10:04 am
Forum: QCAD Developers and Contributors
Topic: how can judge a block entity
Replies: 14
Views: 4812

Re: how can judge a block entity

e is parameter of a function, it's type is RMouseEvent, which is passed by mouseMoveEvent function.
by liguosheng
Mon Mar 21, 2016 9:57 am
Forum: QCAD Developers and Contributors
Topic: how can judge a block entity
Replies: 14
Views: 4812

Re: how can judge a block entity

When i debug program step by step, i found the value of variable entityId was -1, that's ,the following code isn't make:
REntity::Id entityId = di->getClosestEntity(e);

How can get block entity on earth? :cry:
by liguosheng
Mon Mar 21, 2016 9:27 am
Forum: QCAD Developers and Contributors
Topic: how can judge a block entity
Replies: 14
Views: 4812

how can judge a block entity

I can get entity by the following code : REntity::Id entityId = di->getClosestEntity(e); QSharedPointer<REntity> entity = doc->queryEntity(entityId); then the entity is highlighted. But, if it is a part of a block, it can't. Then, the entity is judged firstly, the code is: RS::EntityType type = enti...
by liguosheng
Fri Jan 29, 2016 3:51 am
Forum: QCAD Developers and Contributors
Topic: file cannot be exported
Replies: 0
Views: 2717

file cannot be exported

qcad 3, platform is vs 2008.
a dxf file is opened, then, a file is exported by function of 'documentInterface->exportFile(strFile, tr("dxf"))',
but no file is created, why?
by liguosheng
Mon Jan 25, 2016 12:37 pm
Forum: QCAD Developers and Contributors
Topic: set icon for menu,error
Replies: 1
Views: 2289

Re: set icon for menu,error

problem is solved. variable is used by error.
by liguosheng
Fri Jan 22, 2016 2:03 pm
Forum: QCAD Developers and Contributors
Topic: set icon for menu,error
Replies: 1
Views: 2289

set icon for menu,error

newAct = new RGuiAction(tr("NewFile","&New"),this);
newAct->setRequiresDocument(false);
QString strIcon = tr("../Icon/NewFile.svg");
newGui->setIcon(strIcon);

there's no error when compiling, but linking, an unhandled exception happen, why?
by liguosheng
Wed Jan 20, 2016 2:41 pm
Forum: QCAD Developers and Contributors
Topic: Develop qcad by C++, not script
Replies: 4
Views: 3731

Re: Develop qcad by C++, not script

it's ok, thanks a lot.
:D
by liguosheng
Sun Jan 17, 2016 3:50 am
Forum: QCAD Developers and Contributors
Topic: Develop qcad by C++, not script
Replies: 4
Views: 3731

Re: Develop qcad by C++, not script

If i use qt creator, how can to set script debugger?

Go to advanced search