• 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正常运行
  • 相关阅读:
    深入浅出列生成算法
    小游戏云开发入门
    代码生成器插件与Creator预制体文件解析
    使用四叉树优化碰撞检测
    游戏开发中的人工智能
    一个可屏蔽长短链接的网络模块
    游戏开发中的新手引导与事件管理系统
    Creator填色游戏的一种实现方案
    CocosCreator之AssetBundle使用方案分享
    跨引擎游戏框架说明文档
  • 原文地址:https://www.cnblogs.com/zengjfgit/p/7910642.html
Copyright © 2020-2023  润新知