Re: Cannot run Qt5 applications.

2015-02-04 Thread Jon TURNEY

On 04/02/2015 23:20, David Stacey wrote:

I'm having difficulty running any Qt5 application. These are the
commands I'm issuing:

 XWin -multiwindow &
 export DISPLAY=:0.0
 xclock &

and I see the clock, so X is up and running. Then:

 /usr/lib/qt5/examples/gui/analogclock/analogclock
 QXcbConnection: XCB error: 145 (Unknown), sequence: 162, resource
id: 0, major c
 ode: 140 (Unknown), minor code: 20
 Bad system call (core dumped)


Possibly you need to install and start cygserver (See [1])

If so, this is because Qt5 is assuming shared memory is available, which 
could possibly be handled in a better way...


[1]  http://x.cygwin.com/docs/ug/using-shared-memory.html

--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Cannot run Qt5 applications.

2015-02-04 Thread David Stacey
I'm having difficulty running any Qt5 application. These are the 
commands I'm issuing:


XWin -multiwindow &
export DISPLAY=:0.0
xclock &

and I see the clock, so X is up and running. Then:

/usr/lib/qt5/examples/gui/analogclock/analogclock
QXcbConnection: XCB error: 145 (Unknown), sequence: 162, resource 
id: 0, major c

ode: 140 (Unknown), minor code: 20
Bad system call (core dumped)

and no clock.

I've tried compiling a really trivial Qt5 example (attached):

g++ -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets 
-I/usr/include/qt5/QtGui \

-o qt5-demo qt5-demo.cpp -lQt5Widgets -lQt5Core

And then running ./qt5-demo gives:

QObject::connect: signal not found in QPushButton
QObject::connect: signal not found in QWidget
QObject::connect: signal not found in QWidget
QXcbConnection: XCB error: 145 (Unknown), sequence: 162, resource 
id: 0, major

code: 140 (Unknown), minor code: 20
Bad system call (core dumped)

The demo runs fine in Fedora 21. It also runs in Cygwin when compiled 
with Qt4:


g++ -I/usr/include/qt4 -I/usr/include/qt4/QtGui -o qt5-demo 
qt5-demo.cpp \

-lQtGui -lQtCore

And now running the (incorrectly-named!) ./qt5-demo launches the 
application.


Please could you advise what I'm doing wrong.

Many thanks in advance,

Dave.

#include 
#include 

int main(int argc, char** argv)
{
  QApplication app(argc, argv);
  QPushButton *button = new QPushButton("Hello!");
  QObject::connect(button, SIGNAL(clicked()), &app, SLOT(quit()));
  button->show();
  return app.exec();
}
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/