Qt開發時Qtablewidget如何依據item中的內容獲取item的行數?
				
					![]() 
					
					
					
						發表于2019-05-10
						回復:0
						查看:7501  |  
					
				 
				
					<pre class='brush: cpp'>QString offlineName = QString(QLatin1String(pack->name));
    QList<QTableWidgetItem*> itemVec = ui->tw_useronline->findItems(offlineName,Qt::MatchExactly);
    int row = itemVec.at(0)->row();//程序到此奔潰
    ui->tw_useronline->removeRow(row);</pre>
如何解決?					
					
											
					
									 
			
登錄 慧都網發表評論