mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-04 21:27:41 +08:00
23 lines
612 B
C++
23 lines
612 B
C++
#include <cdroid.h>
|
|
#if ENABLE_BARCODE
|
|
#include <widgetEx/barcodeview.h>
|
|
#endif
|
|
|
|
int main(int argc,const char*argv[]){
|
|
#if ENABLE_BARCODE
|
|
App app(argc,argv);
|
|
Window*w =new Window(0,0,-1,-1);
|
|
BarcodeView*bv=new BarcodeView(200,200);
|
|
w->addView(bv);
|
|
bv->setZoom(2.f);
|
|
bv->setSymbology(BarcodeView::QRCode);
|
|
bv->setText("https://www.sina.com.cn");
|
|
BarcodeView*bv2=new BarcodeView(500,160);
|
|
bv2->setSymbology(BarcodeView::Code11);
|
|
w->addView(bv2).setPos(0,210);
|
|
bv2->setText("138-0123456789");
|
|
w->setBackgroundColor(0xff112233);
|
|
app.exec();
|
|
#endif
|
|
}
|