Qt support for VNC

Posted by muchala123 on Stack Overflow See other posts from Stack Overflow or by muchala123
Published on 2010-05-13T10:00:34Z Indexed on 2010/05/13 10:04 UTC
Read the original article Hit count: 334

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about qt

Related posts about x11