LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Blogs > muchala123
User Name
Password

Notices

Rate this Entry

qt support for VNC

Posted 05-13-2010 at 05:06 AM by muchala123

i want to test whether qt is supporting VNC or not. For that i have written a small layout program using Qt library.

the source code for the layout program is as follows:

layout.cpp
------------------
#include <QApplication>
#include <QHBoxLayout>
#include <QSlider>
#include <QSpinBox>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget *window = new QWidget;
window->setWindowTitle("Enter The Age of the person");
QSpinBox *spinBox = new QSpinBox;
QSlider *slider = new QSlider(Qt::Horizontal);
spinBox->setRange(0, 130);
slider->setRange(0, 130);
QObject::connect(spinBox, SIGNAL(valueChanged(int)),
slider, SLOT(setValue(int)));
QObject::connect(slider, SIGNAL(valueChanged(int)),
spinBox, SLOT(setValue(int)));
spinBox->setValue(35);
QHBoxLayout *layout = new QHBoxLayout;
layout->addWidget(spinBox);
layout->addWidget(slider);
window->setLayout(layout);
window->show();
return app.exec();
}

i want to run this as server application on my linux PC.For that what i configured Qt and installed like this.
1)./configure -qt-gfx-vnc
2) make
3) make install


The program is working fine. But if i run the application as VNC server application like

./layout -qws -display VNC:0

i am encountering an error.it says that
"_X11TransSocketINETConnect() can't get address for VNC:6000: Temporary failure in name resolution"..

pls help me what i need to do.

Thanks
Posted in Uncategorized
Views 1403 Comments 1
« Prev     Main     Next »
Total Comments 1

Comments

  1. Old Comment
    You can not use -qws option.
    It is necessary to compile Qt with -embedded option.

    try this:
    ./layout -display VNC:0

    Best regards
    Posted 06-22-2010 at 09:49 AM by webquinty webquinty is offline
 

  



All times are GMT -5. The time now is 09:30 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration