Announcement

Collapse
No announcement yet.

Qt 5.1: Expected In April, Will Bring In New Modules

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by pali View Post
    What is Qt X11 Extras?
    A set of Classes to do a small number of things "directly with X11" - things which are currently difficult, or impossible to do through XCB.

    Comment


    • #12
      Originally posted by smitty3268 View Post
      That was true in Qt4 apps, but with Qt5 now everyone is having to port to use XCB.

      That's the main set of work going into KWin right now, is porting to XCB so that the eventual Qt5 port can start - which will then lead into Wayland support.
      Not exactly. Qt now uses Platform Plugins, so most of the change is to stop using X11 directly and instead use QPA Classes. Use of Wayland, versus XCB, versus DirectFB, versus Apple OS (AKA Darwin/Cocoa) occurs in two places:

      #1: Your Qt Library must be built with support for the platform(s) which you want to use (it needs header files); and then
      #2 The underlying libraries must also be present on your system, if you request that platform to be used.

      XCB is not "a step on the way towards Wayland"; both are endpoints. It just happens that XCB will be finished quicker. (Because it's an easier job to do, and because the Wayland software stack is still moving forward quickly.)



      Here's examples: If you build the widget-based example 'qtbase/examples/widgets/widgets/mousebuttons/mousebuttons.pro', the resulitng "buttontester" program can be run in the following ways:

      $ ./buttontester (on my Linux platform, this defaults to using the XCB plugin.) or;

      $ wayland-compositor & (i.e., get that going)
      $ ./buttontester -platform wayland

      Or, if your screen is already under the control of DirectFB -

      $ ./buttontester -platform directfb

      ----
      You don't make a single change in the program code, and you don't even have to re-link it. Just fire up the Platform, and Qt's library (if built with that Platform) will do the connection and platform-specific function invocations for you.
      Same program binary. BTW, I wrote that example, and used it to test mouse buttons on those 3 platforms - in exactly this way.

      BTW, Qt 5.0 (and higher) support up to 31 unique buttons on a mouse! (That's for BOTH widgets and QML MouseArea elements- you will find a nearly identical example, using QML, in "qtdeclarative/examples/quick/mousearea"). And whle X11 mouse events present the State of only Left+Right+Middle (and Wheel-up + Wheel-down, which are useless in a "Button State" context) -- Qt 5.0 Mouse Events present the State of every mouse button on your entire device, all the time. So, the notion of "held button 7, while clicking button 10" invoking a different GUI Action than "click button 10" (by itself) finally becomes possible in a C++ toolkit.

      Comment

      Working...
      X