PDA

View Full Version : Cant open Qt Designer



shamik
18th April 2007, 11:31
hiii friends,


i have just installed Fedora Core-6 on my pc. I think Qt3.3 comes with it bydefault.
but whenever i try to start Qt designer from the Applications->Programming->Qt Designer,

the system automatically logs off and then again i have to log-in.
i cant understand what to do with it. i've also tried re-installing the entire OS but the same error persists.

Please tell me what to do .

:confused:

high_flyer
18th April 2007, 12:28
the system automatically logs off and then again i have to log-in.
This should not happen, no matter what.
You have a problem with your system.
The fact it behaves the same after a second intallation might point to a bad installtion medium.

shamik
18th April 2007, 12:44
the installation medium is not bad
its quite new.

high_flyer
18th April 2007, 12:48
I doesn't have to be the disk it self, it could be a CRC error on it - specially if you burnt it your self.
Did you checksum it?
In any case, the system should not logout simply because you started and application, even if the application crashes.

shamik
18th April 2007, 12:52
actually i bought the CDs from trusted people

and i dont think there would be any CRC error as the intallation went on smoothly. if there would have been any such mistake in checksum then the installation would have prompted with it. but its not the case.

high_flyer
18th April 2007, 12:55
Strange indeed.

shamik
18th April 2007, 12:59
truly

its quite strange as it doesnt even prompt for any error message.

anybody got any other idea??

wysota
18th April 2007, 14:43
I had a simmilar problem. It was caused by some errors in Qt library package I used. It was incompatible with KDE or something like that and caused X to crash. Did you update your Qt installation from a medium different than the original disk containing a stable release of the system?

shamik
19th April 2007, 14:10
this is the procedure what i've done so far

first of all i installed FC-6. I got the CDs for this from a reliable source and while installation nothing went wrong or no error message was shown. everything went fine.

then i tried to start the Qt designer from the GUI as well as from the shell by typing "designer"

anyways the X crashed and again the log-in screen appeared.

then i downloaded the Qt version 3.3.8 from the Trolltech's website and installed it in /usr/local/qt. folder as instructed in the install file.

when i try to run this newly and freshly installed Qt after going to /usr/local/qt/bin and typing "./designer" from the shell the same thing happens. i.e. X crashes and the log-in screen appears.
i've set up the library paths, and other environment variables as given in the install file

but still i cant find what is going wrong here.

:(

wysota
19th April 2007, 20:37
Because the problem might not be in Qt itself but in combination of Qt and something else. Check your .xsession-errors (but do it before you log onto X again!!!) and /var/log/Xorg.0.log (before X starts-up again! You may need to disable the display manager first before crashing X if it respawns immediately) or simmilar for errors that happened just before the crash.

shamik
20th April 2007, 06:33
kindly please specify where are these files located like .xsessions-errors etc and please explain step by step procedure coz i dont know much about linux.

on some other machine i installed the donwloaded Qt 4.2.3 as instructed in the install file.
it got installed without any errors and i dint passed any parameters while configuring it
i.e just ./configure

then i set up the environment variables as my qt is installed in /usr/local/qt

but then whenever i try to run it from the shell by going to /usr/local/qt/bin and typing ./designer on the shell the following error occurs :

./designer:error while loading shared libraries:libQtDesignerComponents.so.4:cannot open shared object file: No such file or directory


i've checked for this file in /usr/local/qt/lib and it exists there.

when i type "set" the environment variables are also correct and are as follows :

QTDIR = /usr/local/qt
PWD = /usr/local/qt/bin
QTINC = /usr/local/qt/include
QTLIB = /usr/local/qt/lib
qt_prefix = /usr/local/qt
MANPATH = /usr/local/qt/doc
OLDPWD=/usr/local/qt/


now this time since the installation is on the different machine and i m installing a different version of Qt i.e. Qt4 the problem is different. but the old problem still persists and the solution of that too has to be found.

for the old problem kindly tell the procedure of checking the log files and error files and of disabling the display manager step by step.
and for the new problem please tell what to do regarding this shared file error eventhough it exists.

wysota
20th April 2007, 06:37
.xsession-errors is in logged in user's home directory.

./designer:error while loading shared libraries:libQtDesignerComponents.so.4:cannot open shared object file: No such file or directory


i've checked for this file in /usr/local/qt/lib and it exists there.
This is caused by the fact that the linker doesn't look into /usr/local/qt/lib while resolving dependencies. Add that directory to /etc/ld.so.conf and run ldconfig (as root).

shamik
23rd April 2007, 10:14
the old Qt problem is now solved finally.

the solution was quite simple. as it was not able to load the graphics i just changed the display settings of my screen and just decreased the screen resolution. it is now working fine.

another thing i want to ask is i want to do database connection with Qt for which i wish to use MySQL. But i dont know where is the driver. Is it already available with the version of Qt that i m using currently i.e. 3.3.6 which has come bydefault with FC-6 installation or wheather i have to download that driver from internet and compile it myself.

i supposed that the driver wouldbe in the directory /usr/lib/qt3.3/plugins. but it is not so.

please tell me how to do this database connection and where to find for the driver.

high_flyer
23rd April 2007, 11:14
i supposed that the driver wouldbe in the directory /usr/lib/qt3.3/plugins. but it is not so.
You need to give it as a paremeter when you do configure, before you compile Qt.
do ./configure --help (at Qt source root) for the options possible.

shamik
23rd April 2007, 11:22
i dint installed Qt manually.
it is rather installed bydefault with FC-6 installation.

now how can i get it? do i have to recompile Qt again? if yes then how. the Qt installable source files are in the CDs of FC-6 and i think we cant extract it.
as told previously i have downloaded Qt4.2.3 from Trolltech's website. should i go for it instead of messing up with this?

high_flyer
23rd April 2007, 11:38
in that case look in your package manager, you should be able to select and add various plugins and drivers, the sql among them.

shamik
23rd April 2007, 12:03
i cant open the package manager
whenever i try to click on Add/Remove Software the following error comes :

Unable to retrieve software information. This could be caused by not having a network connection available.
Details : cannot find a valid baseurl for repo: core

i dont know what does this mean.

wysota
23rd April 2007, 12:05
Find a proper rpm from your installation medium then. It'll probably be called qt3-plugin-mysql or something like that.

high_flyer
23rd April 2007, 12:13
Unable to retrieve software information. This could be caused by not having a network connection available.
Details : cannot find a valid baseurl for repo: core
Your package manger is not configured.
You should configure it (tell it where the spository is) - this is a package manager specific question /Fedora specific.
Try and see if you have any configuration/preferences or similar menu options in your package manager GUI front end, and see what comes up.

shamik
23rd April 2007, 12:37
i have found following rpms from the installation media but i dont know which are of use so i m listing out all of them :

qt-3.3.6-13.i386.rpm
qt-config-3.3.6-13.i386.rpm
qt-designer-3.3.6-13.i386.rpm
qt-devel-3.3.6-13.i386.rpm
qt-devel-docs-3.3.6-13.i386.rpm
qt-MySQL-3.3.6-13.i386.rpm
qt-ODBC-3.3.6-13.i386.rpm
sqlite-devel-3.3.6-2.i386.rpm

mysql 5.0.22-2.1.i386.rpm
mysqlclient10-3.23.58-9.2.1.i386.rpm
mysqlclient10-devel-3.23.58-9.21.i386.rpm
mysqlclient14-devel-4.1.14-4.2.1.i386.rpm
mysqlConnector odbc-3.51.12.2.2.i386.rpm
mysql-devel-5.0.22-2.1.i386.rpm
mysql-server-5.0.22-2.1.i386.rpm
mysql-test-5.0.22-2.1.i386.rpm


these are the rpms i've found so far.
tell me now what to do with these??

wysota
23rd April 2007, 13:36
Install qt-MySQL and its dependencies.

shamik
23rd April 2007, 14:05
i have installed two of the packages called
qt-mysql
qt-odbc

now i am getting the drivers in project->database connection
the two drivers i m getting are
QMYSQL3
QODBC

now i m having the same old problem of starting mysql

whenever i try to start it by typing mysql on the terminal it says
cant connect to.....through /var/lib/mysql/mysql.sock

the file there doesnt exists
neither the mysqld service is running.
even if i try to start the service by typing
/etc/init.d/mysqld start
on the terminal
it gives following error :


Initializing MySQL database : Neither host 'root' nor 'localhost' could be looked up with /usr/bin/resolveip'. Please configure the 'hostname' command to return a correct hostname. If yoiu want to solve this at a later stage restart this script with --force option

please tell me how to solve this problem

wysota
24th April 2007, 00:55
I think you should refer to some Fedora knowledge base on how to install mysqld properly. It's probable that you broke something as rpm scripts should have set up the database correctly during installation. As a temporary solution issue this command (as root):
echo "localhost" > /etc/hostname
and try to start the mysql daemon again.

shamik
24th April 2007, 06:40
the temporary solution doesnt work.
i tried as told :
echo "localhost" > /etc/hostname

and then

/etc/init.d/mysqld start

but still the error is same :

"

Initializing MySQL database : Neither host 'localhost.localdomain' nor 'localhost' could be looked up with /usr/bin/resolveip'. Please configure the 'hostname' command to return a correct hostname. If yoiu want to solve this at a later stage restart this script with --force option

"

i havent installed mysql myself.
it has been installed bydefault with FC-6 installation and i havent made any changes to it neither have i made any changes to environement variables or any system files.

on some other pc where a similar fresh installation of FC-6 is done, mysql is running fine. it is only on my pc that it gives this error.

is it possible to solve this problem or i have to uninstall all the rpms of mysql and re-install them? but then re-installing will raise the headache of Qt-MySql driver linking.

so i think it will be better if we make a little more effort and try to solve this problem rather than uninstalling and re-installing.

high_flyer
24th April 2007, 09:46
Is there a special reason why you are using Fedora?
I have used SUSE for years now, and its very friendly as far as standard installations go.
Yast (the package manager) offers you all you need as far as Qt goes.
I am sure that with SUSE you would have been up and running from the start.
You can install it in parallel and try.

wysota
24th April 2007, 10:14
Fedora should be OK for a beginner (although I didn't like it :P), it should have a package manager as well. But the problem here seems to be very weird... I never heard about a system that can't resolve localhost :) So let's take care of it:

echo "127.0.0.1 localhost" >> /etc/hosts

shamik
24th April 2007, 11:41
thankyou soooooo much

mysql is now running successfully.
u r a real Guru

;)

markcole
24th April 2007, 18:11
Fedora should be OK for a beginner (although I didn't like it :P), it should have a package manager as well. But the problem here seems to be very weird... I never heard about a system that can't resolve localhost :) So let's take care of it:

echo "127.0.0.1 localhost" >> /etc/hosts

I have never seen this NOT in the hosts file by default. I am suprised...