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

  • rickst29
    replied
    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.

    Leave a comment:


  • rickst29
    replied
    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.

    Leave a comment:


  • curaga
    replied
    Originally posted by uid313 View Post
    XCB is much cleaner and asynchronous so it should be faster.
    Xlib is synchronous so not as good and may be therefor be slower.
    XCB has its downsides too compared to xlib. Primarily:

    - it requires python to build (a core lib!)
    - it comes as a smattering of tiny libs instead of one big one (this slows down app startup)

    Leave a comment:


  • cbamber85
    replied
    Good to hear that things are progressing nicely.

    I'm waiting a few more minor releases before I port my Qt4 software though, I like the idea of moving the GUI into a separate QML 'layer' but there isn't a clearly defined design pattern or at least a scalable tutorial on migrating a very complex QWidget UI to a QML equivalent. It'll appear in time though as more people take the plunge.

    Leave a comment:


  • uid313
    replied
    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.
    Cool!

    XCB is much cleaner and asynchronous so it should be faster.
    Xlib is synchronous so not as good and may be therefor be slower.

    I wish GTK would get ported to XCB too, but I've heard they're not interested because GTK works and they done lots of ugly hacks and workarounds to make sure it works despite all flaws and issues of Xlib.

    Does Clutter and EFL use XCB?

    Leave a comment:


  • smitty3268
    replied
    Originally posted by uid313 View Post
    Wow, sweet!

    Because I think I've heard before that GTK and Qt just ignored XCB and kept using xlib because they had such messy code with so many hacks to workaround issues in xlib.

    Hearing Qt use XCB is great!
    I wish GTK would use XCB too...
    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.

    Leave a comment:


  • uid313
    replied
    Originally posted by Teho View Post
    Qt 5 already uses XCB. One thing that applications need to do when porting from Qt 4 to 5 is stop using xlib (or so I have understood).
    Wow, sweet!

    Because I think I've heard before that GTK and Qt just ignored XCB and kept using xlib because they had such messy code with so many hacks to workaround issues in xlib.

    Hearing Qt use XCB is great!
    I wish GTK would use XCB too...

    Leave a comment:


  • n3wu53r
    replied
    Originally posted by uid313 View Post
    Looking forward to the improved Wayland support.

    I wish Qt would use XCB instead xlib though.
    I am pretty sure Qt uses XCB (at least 5.x).

    Leave a comment:


  • Teho
    replied
    Originally posted by uid313 View Post
    I wish Qt would use XCB instead xlib though.
    Qt 5 already uses XCB. One thing that applications need to do when porting from Qt 4 to 5 is stop using xlib (or so I have understood).

    Leave a comment:


  • uid313
    replied
    Wayland

    Looking forward to the improved Wayland support.

    I wish Qt would use XCB instead xlib though.

    Leave a comment:

Working...
X