error: QXcbConnection: Could not connect to display

/*********************************************************************************
 *           error: QXcbConnection: Could not connect to display
 * 说明:
 *     调试Qt5支持XCB平台模式的时候遇到的错误。
 *
 *                                              2017-11-28 深圳 南山平山村 曾剑锋
 ********************************************************************************/

一、参考文档:
    1. Qt5: QXcbConnection: Could not connect to display Aborted (core dumped)
        http://bbs.csdn.net/topics/391894181

二、Qt支持X11 XCB

     /home/zengjf/zengjf/zengjfos/buildroot-2017.02.3/.config - Buildroot 2017.02.3 C
    o> Target packages > Graphic libraries and applications (graphic/text) > Qt5 ──
      ┌────────────────────────────────── Qt5 ──────────────────────────────────┐
      │  Arrow keys navigate the menu.  <Enter> selects submenus ---> (or empty │
      │  submenus ----).  Highlighted letters are hotkeys.  Pressing <Y>        │
      │  selectes a feature, while <N> will exclude a feature.  Press           │
      │  <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*] feature │
      │ ┌────^(-)─────────────────────────────────────────────────────────────┐ │
      │ │    -*-     gui module                                               │ │
      │ │    -*-       widgets module                                         │ │
      │ │              *** OpenGL support needs an OpenGL-capable backend *** │ │
      │ │    [*]       linuxfb support                                        │ │
      │ │              *** directfb backend available if directfb is enabled *│ │
      │ │    [*]       X.org XCB support                                      │ │
      │ │              *** eglfs backend available if OpenGL and EGL are enabl│ │
      │ │    (xcb)        Default graphical platform                             │ │
      │ │    [ ]       fontconfig support                                     │ │
      │ │    [ ]       GIF support                                            │ │
      │ └────┴(+)─────────────────────────────────────────────────────────────┘ │
      ├─────────────────────────────────────────────────────────────────────────┤
      │        <Select>    < Exit >    < Help >    < Save >    < Load >         │
      └─────────────────────────────────────────────────────────────────────────┘  

三、错误解决方法
    1. Error 1
        1. cmd: ./Helloworld -platform xcb
        2. error: QXcbConnection: Could not connect to display
        3. resolution: export DISPLAY=:0.0

    2. Error 2
        1. cmd: ./Helloworld -platform xcb
        2. error: QXcbConnection: Could not connect to display :0.0
        3. resolution: 检查X11 Server正常运行

 

时间: 2024-09-17 22:39:15

error: QXcbConnection: Could not connect to display的相关文章

perl-clusterssh:Can&amp;amp;#39;t connect to display `unix:0&amp;amp;#39;

问题描述 clusterssh:Can't connect to display `unix:0' 3C 当我执行命令cssh -L root cluster的时候报错: Can't connect to display `unix:0': No such file or directory at /usr/share/perl5/X11/Protocol.pm line 2264 我的DISPLAY=:0.0 为什么呢 解决方案 sshd_config 中需要打开这两项 AllowTcpFor

ERROR 2003:Can’t connect to MySQL server on ‘localhost’ (10060)

ERROR 2003:Can't connect to MySQL server on 'localhost' (10060) 错误,一直没有连接上. 一.关闭连接机器的防火墙, 二.3306端口在防火强中例外

Network error IOException: Connection refused: connect

参考原文http://blog.csdn.net/hil2000/article/details/6576908 在安装完sql server2012后,配置好环境变量,启动tomcat后报 错"org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Network error IOException: Connection refused: connect)",仔细检查数

mysqldump: Got error: 2003: Can&#039;t connect to MySQL server on &#039;127.0.0.1&#039; (10060)

今天在用批处理进行MySQL自动备份的过程中遇到一个问题,错误提示:mysqldump: Got error: 2003: Can't connect to mysql server on '127.0.0.1' (10060) 在我本机进行测试的时候批处理可以正确执行,但是放在服务器端就是无法执行,(服务器环境window2003),经过考虑本机的mysql与服务器的mysql区别就是端口不同,本机mysql是默认端口:3306,但是服务器的端口经过修改后变成:4900,于是在这里加上端口号:

xmodmap: unable to open display &amp;#39;&amp;#39; Error: Couldn&amp;#39;t connect to XServer passing null display

/********************************************************************************* * xmodmap: unable to open display '' Error: Couldn't connect to XServer passing null display * 说明: * fluxbox窗口管理器通过startx无法执行起来. * * 2017-12-19 深圳 南山平山村 曾剑锋 **********

ERROR 2002 (HY000): Cant connect to local MySQL server through socket的解决方法

连接MySQL提示ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)的解决方法 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 原文:http://www.aiezu.com/db/mysql_cant_connect_thro

MySQL远程连接ERROR 2003 (HY000) Cant connect to MySQL server on (10060)

MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX' (10060)的问题 D:\Users\xiaomaimiao>mysql -uroot -plhr -h192.168.59.159Warning: Using a password on the command line interface can be insecure.ERROR 2003 (HY000): Can't connect to MySQL

jvm-rmi 链接超时 Connection timed out: connect

问题描述 rmi 链接超时 Connection timed out: connect 说要设置 jvm参数 -Dsun.rmi.transport.proxy.connectTimeout=6000 -Dsun.rmi.transport.tcp.responseTimeout=6000 请问这个参数在哪里设置? 解决方案 Connection timed out: connectError:Connection timed out:connect.Error:Connection timed

mq: connect exception: WRAP_EXCEPTION

问题描述 mq: connect exception: WRAP_EXCEPTION 2015-07-13 15:31:27.732 [com.hikvision.cms.zmq.HmqAdapter]-ERROR Jms connection occur error: javax.jms.JMSException: connect exception: WRAP_EXCEPTION at com.hikvision.zmq.jms.transport.ZmqTransport.handleCo