Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Creating an application using XCB
Forum Updated to NodeBB v4.3 + New Features

Creating an application using XCB

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 3.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K-StrK Offline
    K-StrK Offline
    K-Str
    wrote on last edited by K-Str
    #1

    Hello to everybody,
    I'm new here and I'm srongly searching for a solution for my problem:
    I would like to write a simple GUI application using XCB.
    Has anybody a small example where I can learn from or is there a group in this forum where I can find more?
    Thanks a lot in advance!
    Kurt

    jsulmJ mrjjM 2 Replies Last reply
    0
    • K-StrK K-Str

      Hello to everybody,
      I'm new here and I'm srongly searching for a solution for my problem:
      I would like to write a simple GUI application using XCB.
      Has anybody a small example where I can learn from or is there a group in this forum where I can find more?
      Thanks a lot in advance!
      Kurt

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @K-Str How is your question related to Qt?
      You should start here: https://xcb.freedesktop.org/

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • K-StrK K-Str

        Hello to everybody,
        I'm new here and I'm srongly searching for a solution for my problem:
        I would like to write a simple GUI application using XCB.
        Has anybody a small example where I can learn from or is there a group in this forum where I can find more?
        Thanks a lot in advance!
        Kurt

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @K-Str
        Hi
        There are samples on the site
        https://xcb.freedesktop.org/tutorial/basicwindowsanddrawing/

        1 Reply Last reply
        0
        • K-StrK Offline
          K-StrK Offline
          K-Str
          wrote on last edited by K-Str
          #4

          Hello jsulm,
          I would like tocreate a QT project using the QT Creator whizzard. This means:

            1. creating a project (e.g QT Widgets) application.
            1. designing a window using the Forms wizzard.

          then I create the programm, compile and link it. at least Starting the programm on the Raspberry and everything is fine ;-)
          Do you think this is possible? Or must I write an application line by line using an editor?
          Hello mrjj,
          Tanks for this hint. Buuut....
          How can I make this by using QT Crator?
          Kurt

          mrjjM 1 Reply Last reply
          0
          • K-StrK K-Str

            Hello jsulm,
            I would like tocreate a QT project using the QT Creator whizzard. This means:

              1. creating a project (e.g QT Widgets) application.
              1. designing a window using the Forms wizzard.

            then I create the programm, compile and link it. at least Starting the programm on the Raspberry and everything is fine ;-)
            Do you think this is possible? Or must I write an application line by line using an editor?
            Hello mrjj,
            Tanks for this hint. Buuut....
            How can I make this by using QT Crator?
            Kurt

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #5

            @K-Str
            That is very possible with Qt but why you talk about XCB then?
            http://doc.qt.io/qt-5/gettingstartedqt.html

            you cannot make XCB windows in Qt Designer :)
            well you could draw them, then create an app that can take the gui files and create XCB calls from it.

            Why not just get this
            http://www.qtrpi.com/home

            and use Qt directly on the pi?
            (and forget about XCB)

            1 Reply Last reply
            0
            • K-StrK Offline
              K-StrK Offline
              K-Str
              wrote on last edited by
              #6

              @mrjj
              I use a Raspberry and a 3.2" display having a SPI interface. But Standard QT is having a HDMI interface. Thats my problem.

              1 Reply Last reply
              0
              • sneubertS Offline
                sneubertS Offline
                sneubert
                wrote on last edited by
                #7

                Hi Kurt,

                you don“t write a special application for XCB. You can use the xcb platform plugin to run a normal QWidget application under x11.

                ./myProg --platform xcb
                

                see http://doc.qt.io/qt-5/embedded-linux.html#xcb

                1 Reply Last reply
                2
                • K-StrK Offline
                  K-StrK Offline
                  K-Str
                  wrote on last edited by
                  #8

                  Hi sneubert,
                  thanks for your answer.
                  Sorry but I do not understand.
                  I'm not really familiar with QT. But I think xcb is already installed.

                  • There is a directory : \SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\include
                  • and a QT Project Include file : qt_lib_xcb_qpa_lib_private.pri

                  can I use this pri file?
                  Where must I insert ./myProg --platform xcb.

                  jsulmJ 1 Reply Last reply
                  0
                  • K-StrK K-Str

                    Hi sneubert,
                    thanks for your answer.
                    Sorry but I do not understand.
                    I'm not really familiar with QT. But I think xcb is already installed.

                    • There is a directory : \SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\include
                    • and a QT Project Include file : qt_lib_xcb_qpa_lib_private.pri

                    can I use this pri file?
                    Where must I insert ./myProg --platform xcb.

                    jsulmJ Online
                    jsulmJ Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by jsulm
                    #9

                    @K-Str If you write a Qt application you usually don't care whether it uses XCB, win32 API, frame buffer or what ever. This is handled for you by Qt. This is one of the reasons why Qt exists. You just need to use the correct platform plug-in as @sneubert said, please check the link he provided. No need to use XCB directly.
                    "But Standard QT is having a HDMI interface" - Qt does not have such interfaces. Is X11 running on your Raspberry Pi and if so is it running on this SPI display? If it does then your Qt app should work there.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    2
                    • K-StrK Offline
                      K-StrK Offline
                      K-Str
                      wrote on last edited by
                      #10

                      Hello to all,
                      thanks a lot for your hints.
                      sneubert recommended to use the following command to run it:
                      ./applicationName --platform linuxfb:fb=/dev/fb1
                      This works fine.
                      Thanks.
                      Kurt

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved