How can I set up the QMYSQL driver in PySide? - pyqt

I'm trying to set up the QMYSQL driver in PySide. I've tried looking at the Qt documentation but that didn't work. Is there a specific way to set the driver up?

If your using linux you can install the driver. For ubuntu:
sudo apt-get install python-qt4-sql
Apparently, for windows if you get the message:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC QPSQL7 QPSQL
you have to build QMYSQL driver yourself as explained here.

Related

How To Debug NoAvailableAdapter for Nannou with Debian running Gnome xOrg?

I tried setting up Nannou following the instructions here.
I am running Debian Buster on a MacBook with an NVIDIA graphics card (GK107M [GeForce GT 750M Mac Edition]).
I tried running the example and get the error
thread 'main' panicked at 'could not build default app window: NoAvailableAdapter'
It seems this is an error when Nannou tries to open a window -- something about its communication with the window manager (Gnome on xOrg), or something about vulcan-tools.
Any ideas for how to debug this?
The issue is that I was using the open-source Nouveau driver for my graphics card (the default on Debian) which does not currently support Vulkan, which is required for Nannou.
By installing the proprietary nvidia graphics driver, the problem was resolved.
I was able to install the nvidia driver by running
apt install nvidia-driver,
and then rebooting my computer,
as described in this tutorial https://linuxconfig.org/how-to-install-nvidia-driver-on-debian-10-buster-linux
Now nannou works :)

aticonfig no supported adapters detected

I want to install redhat or centos on computer,but when the linux system run on the computer,
the electric fan is run fast and hot,then I try to install ati driver to slove the problem,every time I install the rpm of driver,but the last step,"aticonfig --initial" it doesn't work,the system point out "aticonfig no supported adapters detected ",How cai I solve the problem ?Thank you very much.

installing headers for 3.5 kernel in debian wheezy?

Yesterday, I compiled the 3.5 kernel in debian wheezy (testing), in a thinkpad edge S430 (i5). I did it following this blog, with all the default options. It seems succesful, but then, I tried to install the proprietary nvidia driver with m-a auto-install nvidia-kernel. The install is not able to proceed until the correct headers are installed. However, I have tried both manually to install linux-headers-3.5.0-18 and the linux-headers-amd64 package, but module assistant is not able to see them, showing the following message:
Bad luck, the kernel headers for the target kernel version could not be found and you did not specify other valid kernel headers to use.
There are other ways to install the driver, but I think that the problem with headers is broader.
Although I have been a Debian user for some years, I am far from being an expert, and I am not clear with the problems that I might face when compiling a 3.5 kernel on a Debian testing, so any help and explanation will be much appreciated.
First run
sudo m-a prepare
Getting source for kernel version: 3.8.5-ck1
Kernel headers available in /usr/src/linux-headers-3.8.5-ck1
Creating symlink..
Then do
sudo m-a a-i nvidia
and it should work.
Note that I did this on 3.8.5-ck1, but I built and installed that kernel in a similar fashion to how I wrote up the 3.5 build that you followed.

BlueCove library bluecove not available - Error using Bluecove/Java

How do I install Bluecove in Ubuntu 11/Eclipse IDE?
As far as i was aware, all I had to do was add the bluecove.jar and bluecove-gpl.jar to the Build-Path of the project within Eclipse.
I'm using some sample Bluecove code found here: http://bluecove.sourceforge.net/bluecove/apidocs/overview-summary.html#DeviceDiscovery
When I compile it, I'm getting an error: Native Library bluecove_x64 not available
Exception in thread "main" javax.bluetooth.BluetoothStateException: BlueCove library bluecove not available
Obviously, my Bluetooth USB dongle is plugged in when I do this...
I definitely have BlueZ protocol stack installed.
What am I doing wrong? Is Bluecove supported by 64-bit Linux? I've also been trying to get it installed on a CentOS 5.5 machine as well, but with no luck.
Any help would be greatly appreciated. Thank-you
I found an solutution to the problem.
for ubuntu version
sudo apt-get install libbluetooth-dev
for fedora version
yum install bluez-libs-devel
should do the trick
Source: http://bluecove.org/bluecove-gpl/
Source: http://yasir03.online.fr/?p=267
The package has a differant name in CentOS 5.5... it is
bluez-libs-devel-3.7-1.1.x86_64 <---64-bit
bluez-libs-devel-3.7-1.1.i386 <---32-bit

Using OpenGL Without X-Window System

How to OpenGL on Linux Platform Without X-Window System, can I send OpenGL Graphics Directly to Framebuffer Device?
There Is Project Named DirectFB (Direct FrameBuffer). With DirectFB We can do this but DirectFB needs for driver for each hardware and I want to user a graphic card that only have Linux driver.
This is how i did it in my ubuntu 11.04 in detail:
1- Install the dependencies using the command:
sudo apt-get install xutils-dev libpciaccess-dev x11proto-dri2-dev x11proto-gl-dev libxdamage-dev libxfixes-dev
2- The mesa library needs libdrm version >= 2.4.24 which is not available in the ubuntu 11.04 repository (older version is available) so you have to download the source and build it using the following commands:
./configure
make
make install
3-Download mesa library and then compile it using the following commands:
./configure --prefix=install_directory
make realclean
make linux-fbdev
sudo make install
be careful when you choose the install_directory so that you don't overwrite the system's mesa library.
after that compile your application using the options : -lGL -lOSMesa -ldl -L'install_directory/lib' -I'install_directory/include'
Apparently is possible to have SDL running without X.
Basically, your kernel should have framebuffer support and you could use SDL on top of DirectFB.
These threads are ok:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2006-October/058305.html
http://forums.libsdl.org/viewtopic.php?t=4079
As you said, you need a driver to do this. 99.9% of all Linux graphics drivers use X11, so unless you have a DirectFB OpenGL driver for your hardware, you are stuck with using X11.
I use the SDL (Simple Direct Media Layer) for OpenGL programming in Linux. This site has some nice tutorials to get you set up. One advantage of using SDL is that it will port across platforms, so once you get something running on Linux, it'll transfer right over to Windows so long as you have SDL installed there.
You can use Mesa for framebuffer-based software rendering.

Resources