Problem with querymodel example model
-
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.
-
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.
-
Thank you rely SGaist !!
I'm appreciated your advice.
you say "your database correctly"
that what mean ?
I using database in mysql
-
It means, did you properly use QSqlDatabase to create a connection to your database ? Did you call open ? Check that it succeeded etc...