void MainChoice::openInfoWindow(){ CDevice *device = new CDevice(); device->setTheshold(0, 100); device->setTemperature(0, 100); device->setCurrentMode(3); infoSystem *is = new infoSystem(); is->setDevice(device); is->refreshData(); is->show(); close(); }
int main(int argc, char *argv[]) { QApplication a(argc, argv); // MainWindow w; // w.show(); // CDevice *device = new CDevice(); QDir path; QLibrary lib("libusb-1.0.dll"); if(!lib.load()){ QMessageBox * msg = new QMessageBox(); msg->setText("NO Lib"); msg->show(); } QTextCodec *utfcodec = QTextCodec::codecForName("cp1251"); QTextCodec::setCodecForTr(utfcodec); QTextCodec::setCodecForCStrings(utfcodec); CDevice *device = new CDevice(); device->setTheshold(0, 100); device->setTemperature(0, 100); device->setCurrentMode(3); infoSystem is; is.setDevice(device); is.refreshData(); is.show(); // device->setTheshold(0, 100); // device->setTemperature(0, 100); // device->setCurrentMode(3); // infoSystem is; // is.setDevice(device); // is.refreshData(); // is.show(); return a.exec(); }