Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Spanish
  4. Se puede pasar una lista completa del dialog al mainwindow????
Forum Updated to NodeBB v4.3 + New Features

Se puede pasar una lista completa del dialog al mainwindow????

Scheduled Pinned Locked Moved Unsolved Spanish
2 Posts 2 Posters 500 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Casino
    wrote on last edited by
    #1

    En el caso de que se pudiera, cual es la forma???

    JonBJ 1 Reply Last reply
    0
    • C Casino

      En el caso de que se pudiera, cual es la forma???

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @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();
      }
      
      1 Reply Last reply
      0
      • SGaistS SGaist moved this topic from General and Desktop on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved