@Casino
class ADialog : public QDialog { private: QStringList _stringList; // In ui->... QListWidget *listWidget; public: QStringList stringList() const { return _stringList; } QStringList widgetStringList() const { QStringList stringList; for (const QListWidgetItem &item : ui->listWidget->selectedItems()) stringList.append(item.text()); return stringList; } } // In main window ADialog aDialog; if (aDialog.exec()) { qDebug() << aDialog.stringList(); qDebug() << aDialog.widgetStringList(); }Spanish
A forum for those speaking Spanish
505
Topics
1.8k
Posts
-
QMdiArea Opciones de Tab?
Unsolved -
-
Manipular Microsoft Word desde Qt
Unsolved -
-
Usar WindowCloseButtonHint
Solved -
Qt 9 no responde
Solved -
qtrpt y qt creator 6.0
Unsolved -
TCP/IP Python para Qt
Unsolved -
-
-
Controlar una Subventana del Menu Bar
Moved Unsolved -
-
-
Import Error Dll QtWidgets of Pyqt6.
Moved Unsolved -
-
Problema al generar APP Bundle
Unsolved -
-
-
Problema Idioma en Chino (creo) Qt
Unsolved -