Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. 'QInputDialog' has not been declared - embadded development
Forum Updated to NodeBB v4.3 + New Features

'QInputDialog' has not been declared - embadded development

Scheduled Pinned Locked Moved Solved Mobile and Embedded
21 Posts 3 Posters 5.5k Views 2 Watching
  • 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.
  • A ambershark

    @Kashif Hmm this is really weird ...

    Can you check permissions on the QInputDialog files in /opt/ .. those are the ones it should be using to cross compile. Make sure you have read permissions to them.

    Next, let's see if maybe the qmake you are using is finding the wrong qmake or something, run qmake -query and paste results here.

    I'm kind of reaching at this point though. Everything looks good so far like it should work.

    Another idea is create a simple project that just has a main and a QInputDialog::getText or something and see if you can get that to build with your cross compiler toolchain. Take all the complexity from your actual project out of it.

    K Offline
    K Offline
    Kashif
    wrote on last edited by
    #11

    Hi @ambershark,

    Following are the permissions:

    gmx@GMX-SDK:~$ ls -l /usr/include/qt4/QtGui/QInputDialog
    -rw-r--r-- 1 root root 26 Apr 26  2012 /usr/include/qt4/QtGui/QInputDialog
    gmx@GMX-SDK:~$ 
    gmx@GMX-SDK:~$ 
    gmx@GMX-SDK:~$ 
    gmx@GMX-SDK:~$ 
    gmx@GMX-SDK:~$ ls -l /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog
    -rw-r--r-- 1 root root 26 Jun  7  2013 /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog
    gmx@GMX-SDK:~$ 
    gmx@GMX-SDK:~$ 
    gmx@GMX-SDK:~$ 
    gmx@GMX-SDK:~$ ls -l /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog
    -rw-r--r-- 1 root root 26 Jun  7  2013 /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog
    gmx@GMX-SDK:~$ 
    gmx@GMX-SDK:~$ 
    

    qmake -query results:

    gmx@GMX-SDK:~$ qmake -query
    QT_INSTALL_PREFIX:/usr
    QT_INSTALL_DATA:/usr/share/qt4
    QT_INSTALL_DOCS:/usr/share/qt4/doc
    QT_INSTALL_HEADERS:/usr/include/qt4
    QT_INSTALL_LIBS:/usr/lib/x86_64-linux-gnu
    QT_INSTALL_BINS:/usr/bin
    QT_INSTALL_PLUGINS:/usr/lib/x86_64-linux-gnu/qt4/plugins
    QT_INSTALL_IMPORTS:/usr/lib/x86_64-linux-gnu/qt4/imports
    QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations
    QT_INSTALL_CONFIGURATION:/etc/xdg
    QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples
    QT_INSTALL_DEMOS:/usr/lib/qt4/demos
    QMAKE_MKSPECS:/usr/share/qt4/mkspecs
    QMAKE_VERSION:2.01a
    QT_VERSION:4.8.2
    gmx@GMX-SDK:~$ 
    

    Let me try with simple project as you suggested.

    Thanks

    K 1 Reply Last reply
    0
    • A ambershark

      @Kashif Hmm this is really weird ...

      Can you check permissions on the QInputDialog files in /opt/ .. those are the ones it should be using to cross compile. Make sure you have read permissions to them.

      Next, let's see if maybe the qmake you are using is finding the wrong qmake or something, run qmake -query and paste results here.

      I'm kind of reaching at this point though. Everything looks good so far like it should work.

      Another idea is create a simple project that just has a main and a QInputDialog::getText or something and see if you can get that to build with your cross compiler toolchain. Take all the complexity from your actual project out of it.

      K Offline
      K Offline
      Kashif
      wrote on last edited by
      #12

      Hi @ambershark,
      I altered device vendor's sample gui application, comment all widgets and widget-items. Added the code available in qt documentation to test QInoutDialog:getItem.
      Still same error.

      Thanks

      1 Reply Last reply
      0
      • K Kashif

        Hi @ambershark,

        Following are the permissions:

        gmx@GMX-SDK:~$ ls -l /usr/include/qt4/QtGui/QInputDialog
        -rw-r--r-- 1 root root 26 Apr 26  2012 /usr/include/qt4/QtGui/QInputDialog
        gmx@GMX-SDK:~$ 
        gmx@GMX-SDK:~$ 
        gmx@GMX-SDK:~$ 
        gmx@GMX-SDK:~$ 
        gmx@GMX-SDK:~$ ls -l /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog
        -rw-r--r-- 1 root root 26 Jun  7  2013 /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/target/include/QtGui/QInputDialog
        gmx@GMX-SDK:~$ 
        gmx@GMX-SDK:~$ 
        gmx@GMX-SDK:~$ 
        gmx@GMX-SDK:~$ ls -l /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog
        -rw-r--r-- 1 root root 26 Jun  7  2013 /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/host/include/QtGui/QInputDialog
        gmx@GMX-SDK:~$ 
        gmx@GMX-SDK:~$ 
        

        qmake -query results:

        gmx@GMX-SDK:~$ qmake -query
        QT_INSTALL_PREFIX:/usr
        QT_INSTALL_DATA:/usr/share/qt4
        QT_INSTALL_DOCS:/usr/share/qt4/doc
        QT_INSTALL_HEADERS:/usr/include/qt4
        QT_INSTALL_LIBS:/usr/lib/x86_64-linux-gnu
        QT_INSTALL_BINS:/usr/bin
        QT_INSTALL_PLUGINS:/usr/lib/x86_64-linux-gnu/qt4/plugins
        QT_INSTALL_IMPORTS:/usr/lib/x86_64-linux-gnu/qt4/imports
        QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations
        QT_INSTALL_CONFIGURATION:/etc/xdg
        QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples
        QT_INSTALL_DEMOS:/usr/lib/qt4/demos
        QMAKE_MKSPECS:/usr/share/qt4/mkspecs
        QMAKE_VERSION:2.01a
        QT_VERSION:4.8.2
        gmx@GMX-SDK:~$ 
        

        Let me try with simple project as you suggested.

        Thanks

        K Offline
        K Offline
        Kashif
        wrote on last edited by
        #13

        Hi @Kashif,

        I got the following reply from my device vendor:

        I checked on our SDK and QInputDialog is disabled from the toolchain by default in the QtExtended from qtopia, you can look at
        http://doc.qt.io/archives/qt-4.8 and look for an alternative. the list of disabled elements by qtopia can be found at
        /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/qconfig-qpe.h
        in your toolchain
        

        Can you please suggest an approach to achieve my target:

        0> User have Purchase Ticket / Refund Ticket options
        1> User selects purchase ticket
        2> Application lists types of tickets
            a> User Selects ticket or cancel (until completion/user selection step 3 should not execute)
        3> Do purchase process or exit purchase process
        

        Thanks

        A 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #14

          Hi,

          You can build your own QDialog for that purpose or depending on your application a QWizard might also be an option.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • K Kashif

            Hi @Kashif,

            I got the following reply from my device vendor:

            I checked on our SDK and QInputDialog is disabled from the toolchain by default in the QtExtended from qtopia, you can look at
            http://doc.qt.io/archives/qt-4.8 and look for an alternative. the list of disabled elements by qtopia can be found at
            /opt/toolchain/arm-unknown-linux-gnueabi/sysroot/usr/QtopiaSDK/qtopiacore/qconfig-qpe.h
            in your toolchain
            

            Can you please suggest an approach to achieve my target:

            0> User have Purchase Ticket / Refund Ticket options
            1> User selects purchase ticket
            2> Application lists types of tickets
                a> User Selects ticket or cancel (until completion/user selection step 3 should not execute)
            3> Do purchase process or exit purchase process
            

            Thanks

            A Offline
            A Offline
            ambershark
            wrote on last edited by
            #15

            @Kashif said in 'QInputDialog' has not been declared - embadded development:

            is disabled from the toolchain by default in the QtExtended from qtopia

            Well that makes a lot more sense. :)

            Like @SGaist said, just write your own QDialog. Make it modal by calling it with myDialog->exec() and test that return code for a QDialog::Accepted in order to proceed or QDialog::Rejected in order to exit the process.

            My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

            K 1 Reply Last reply
            1
            • A ambershark

              @Kashif said in 'QInputDialog' has not been declared - embadded development:

              is disabled from the toolchain by default in the QtExtended from qtopia

              Well that makes a lot more sense. :)

              Like @SGaist said, just write your own QDialog. Make it modal by calling it with myDialog->exec() and test that return code for a QDialog::Accepted in order to proceed or QDialog::Rejected in order to exit the process.

              K Offline
              K Offline
              Kashif
              wrote on last edited by
              #16

              Hi @SGaist and @ambershark,

              I am planned to create custom dialog using QDialog class, in parallel I have placed a question to device vendor if I can use QDialog? or if I can use QTCore application. I hope I'll get positive reply for at least one of them.

              Thanks for your time and response.

              A 1 Reply Last reply
              0
              • K Kashif

                Hi @SGaist and @ambershark,

                I am planned to create custom dialog using QDialog class, in parallel I have placed a question to device vendor if I can use QDialog? or if I can use QTCore application. I hope I'll get positive reply for at least one of them.

                Thanks for your time and response.

                A Offline
                A Offline
                ambershark
                wrote on last edited by
                #17

                @Kashif If you can't use QDialog, there are other ways to simulate it, getting user input from a qwidget and not allowed it to proceed until your widget is closed.

                And if you can't use qwidgets, well then you don't really have a gui and none of this matters. :)

                My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                K 3 Replies Last reply
                1
                • A ambershark

                  @Kashif If you can't use QDialog, there are other ways to simulate it, getting user input from a qwidget and not allowed it to proceed until your widget is closed.

                  And if you can't use qwidgets, well then you don't really have a gui and none of this matters. :)

                  K Offline
                  K Offline
                  Kashif
                  wrote on last edited by Kashif
                  #18

                  Hi @ambershark,

                  PreviouslyI have created secondary widget and called it but my parent widget code was also running this was the reason I moved towards QDialog.
                  The good new is I have created a custom sample dialog class and it is working as required. Now I have to make it similar to QInputDialog. Following is the code from my custom dialog class:

                  #ifndef APPSELECTIONDIALOG_H
                  #define APPSELECTIONDIALOG_H
                  
                  
                  #include <QtGui/QDialog>
                  #include <QtGui/QVBoxLayout>
                  #include <QtGui/QLineEdit>
                  #include <QtGui/QPushButton>
                  //#include <QtGui/QLabel>
                  
                  class appSelectionDialog: public QDialog
                  {
                      Q_OBJECT
                  public:
                      explicit appSelectionDialog(QWidget *p = 0): QDialog(p) {
                          QVBoxLayout *layout = new QVBoxLayout(this);
                          lineEdit = new QLineEdit(this);
                          QPushButton *button = new QPushButton("Ok", this);
                          layout->addWidget(lineEdit);
                          layout->addWidget(button);
                          setLayout(layout);
                  
                          connect(button, SIGNAL(clicked()), SLOT(accept()));
                      }
                  
                      QString getText() const {
                          return lineEdit->text();
                      }
                  private:
                      QLineEdit *lineEdit;
                  };
                  
                  #endif // APPSELECTIONDIALOG_H
                  

                  Calling function:

                      appSelectionDialog dialog; // dialog object exists
                      (void) dialog.exec();    // dialog is visible
                      DBGPRINTF(LOG_INFO, CLASS_EMV,"Text [%s]", dialog.getText().toLocal8Bit().constData() );  //This method prints the text on console in c format
                  

                  If you have reference to make it similar to QInputDialog please share it :)

                  Thanks

                  1 Reply Last reply
                  0
                  • A ambershark

                    @Kashif If you can't use QDialog, there are other ways to simulate it, getting user input from a qwidget and not allowed it to proceed until your widget is closed.

                    And if you can't use qwidgets, well then you don't really have a gui and none of this matters. :)

                    K Offline
                    K Offline
                    Kashif
                    wrote on last edited by
                    #19

                    Hi @ambershark,

                    Can you please help me how do I modify the constructor to get the parameters similar to QInputDialog::getItem

                    Thanks

                    1 Reply Last reply
                    0
                    • A ambershark

                      @Kashif If you can't use QDialog, there are other ways to simulate it, getting user input from a qwidget and not allowed it to proceed until your widget is closed.

                      And if you can't use qwidgets, well then you don't really have a gui and none of this matters. :)

                      K Offline
                      K Offline
                      Kashif
                      wrote on last edited by
                      #20

                      Hi @ambershark,

                      I have created the constructor successfully and it display the item in comboBox.

                      Thanks for your help.

                      A 1 Reply Last reply
                      1
                      • K Kashif

                        Hi @ambershark,

                        I have created the constructor successfully and it display the item in comboBox.

                        Thanks for your help.

                        A Offline
                        A Offline
                        ambershark
                        wrote on last edited by
                        #21

                        @Kashif Nice! Glad you got everything working.

                        Don't forget to mark the topic as solved. :)

                        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                        1 Reply Last reply
                        0

                        • Login

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