【Qt】ComboBox 下拉式選單
1. 建立選單資料
ui->ComboBox->insertItem(0,"ONE")
ui->ComboBox->insertItem(1,"SEC")
2.指定選取
ui->ComboBox->setCurrentIndex(1);
顯示第二筆選項
3.取得當前選擇
int num = ui->ComboBox->CurrentIndex();
QString text = ui->ComboBox->CurrentText);
2019年8月2日 星期五
訂閱:
張貼留言 (Atom)
【Arduino】 RS485 實現Modbus Slave
這次使用Arduino UNO + RS485 的模組,來實現Modbus Slave 的通訊 Pin Name Pin Description VCC 5V A Non-inverting Receiver Input Non-Inverting Driver Output ...
.png)
-
當樹梅派使用HDMI輸出時,雖然會自動抓取解析度,但往往達不到最佳效果, 以下就來介紹幾種調整解析度的方法: 方法一:直接對設定檔做更改 1.在終端機中輸入 sudo nano /boot/config.txt 2.找到下列位置
-
【Qt】開啟文件 如何在視窗中設置開啟檔案: 1. 使用QFileDialog #include<QFileDialog> 2. 在事件中加入 QString Filename = QFileDialog::getOpenFileName(this, ...
-
【Qt】ComboBox 下拉式選單 1. 建立選單資料 ui->ComboBox->insertItem(0,"ONE") ui->ComboBox->insertItem(1,"SEC")
沒有留言:
張貼留言