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. Problem with querymodel example model

Problem with querymodel example model

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 979 Views 1 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 Offline
    A Offline
    arinbluse
    wrote on last edited by
    #1

    Hi,

    I'm sorry to that did not English well

    I'm studying qt5, this site example.

    Linux

    my problem site link is here.

    qt-project.org/doc/qt-5.0/qtsql/querymodel.html

    but I'dont know why this problem message.

    /////////////////////////////////////////////////////////////////////////////////////////////
    Starting /root/build-model-Desktop_Qt_5_1_0_GCC_32bit-Debug/model...

    (model:2139): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

    QSqlQuery::exec: database not open
    QSqlQuery::exec: database not open
    QSqlQuery::exec: database not open
    OpenGL Warning: Failed to connect to host. Make sure 3D acceleration is enabled for this VM.

    /root/build-model-Desktop_Qt_5_1_0_GCC_32bit-Debug/model exited with code 0

    ////////////////////////////////////////////////////////////////////////////////////////////////

    I want to solve this problem.

    please help me.

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

      Hi and welcome to devnet,

      "database not open", did you setup your database correctly ?

      Also, why are you developing as root ? It's very bad practice even if you are the only one using the virtual machine.

      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
      0
      • A Offline
        A Offline
        arinbluse
        wrote on last edited by
        #3

        Thank you rely SGaist !!

        I'm appreciated your advice.

        you say "your database correctly"

        that what mean ?

        I using database in mysql

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

          It means, did you properly use QSqlDatabase to create a connection to your database ? Did you call open ? Check that it succeeded etc...

          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
          0

          • Login

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