Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QT & acdbDisplayPreviewFromDwg

0 REPLIES 0
Reply
Message 1 of 1
leonimas
400 Views, 0 Replies

QT & acdbDisplayPreviewFromDwg

Hi to all,

I want create a thumbnails dialog with QT, to show a dwg file (one or more dwgs); I've

writed the following codes:

 

HWND acadHandle = adsw_acadMainWnd();
QWinWidget win(acadHandle);
symPreviewDiag diag(&win); // the QT dialog

 

::EnableWindow (acadHandle, true);
::SetFocus (acadHandle);


diag.setWindowModality(Qt::WindowModality::ApplicationModal);

diag.show();
QPlatformNativeInterface* inter = QGuiApplication::platformNativeInterface();

QWindow* w=diag.windowHandle(); // is NOT equal to 0
HWND h = static_cast<HWND>(inter->nativeResourceForWindow(QByteArrayLiteral("handle"), w)); // is NOT equal to 0


bool b = false;
b = acdbDisplayPreviewFromDwg(result->resval.rstring, h, (Adesk::UInt32 *)RGB(255,0,255)); // the b value is 'true'
diag.update();

(void) a.exec();

 

I see the qt dialog but i don't see the dwg files ... 😞 !

Must I use a QWidget child of QTDialog ?

Which type of QWidget ?

 

Many thanks

Leonard

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost