Quantcast
Viewing all articles
Browse latest Browse all 14319

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

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 14319

Trending Articles