qml - Can i use quick controls in a qt widgets application? -


i need material styled replacements of standard widgets , it's kind of hard implement them using custom widgets. wondering if there's way include widgets quick control module , use them regular widgets?

if application qt5.1 , above, answer yes can.

you have use qquickview object , pass static function createwindowcontainer of qwidget, takes qwindow in paramater.

qquickview derived qquickwindow derived qwindow.

so can pass qquickview input createwindowcontainer.

below rough code.

//create qquickview  object. qquickview *view = new qquickview();  //add qquickview  object qwidget::createwindowcontainer qwidget *container = qwidget::createwindowcontainer(view, this);  //add source view->setsource(qurl("your.qml"));  //add container layout. ui->verticallayout->addwidget(container); 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -