[Moved] QtCreator vs CMake Project



  • Hi there,

    I'm new to QtCreator, been working with CMake for a while, I love the environment of QtCreator and how easy it is to find everything, the many available tools (Designer, Debugger, Help, etc). I am right now trying to take a CMake project into QtCreator and viceversa (just want to know how to work with both, advantages, disadvantages, etc.)
    I am working under Ubuntu 11.04, QtCreator 2.01, Qt 4.7.0, no graphics card. The first thing I noticed is that my CMake executable is not using the Ubuntu theme, all buttons, window borders, menus, etc have a very basic look and icons, QGraphicsItems, don't look as they should... On the other hand, the QtCreator executable seems to be using the current Ubuntu theme with all buttons, icons, items, etc.
    I have included the same libraries needed for my project to run in both the CMakeLists.txt and the Qt project file... unless QtCreator includes something by default to make use of Ubuntu's theme and I have no knowledge of those "by default" configurations. Could this be the case? and if so, what is it that makes the Qt project work with the Ubuntu theme?
    One more thing is that every time I try to, for example, drag and drop one of my items into my Scene I get a huge list of the following type of errors:
    @
    X Error: BadValue (integer parameter out of range for operation) 2
    Major opcode: 53 (X_CreatePixmap)
    Resource id: 0x0
    X Error: BadDrawable (invalid Pixmap or Window parameter) 9
    Major opcode: 55 (X_CreateGC)
    Resource id: 0x5a000cd
    X Error: BadGC (invalid GC parameter) 13
    Major opcode: 60 (X_FreeGC)
    Resource id: 0x5a000cd
    X Error: BadPixmap (invalid Pixmap parameter) 4
    Major opcode: 93 (X_CreateCursor)
    Resource id: 0x5a000cd
    X Error: BadCursor (invalid Cursor parameter) 6
    Major opcode: 2 (X_ChangeWindowAttributes)
    Resource id: 0x5a000cf
    @

    Thanks in advance for any help,
    Boris


  • Moderators

    Are you running your application as a different user? The other user needs to have the theming set up properly then. That is the most common cause for this effect... not sure it is what you are seeing.

    In general Qt apps should look the same, independent of how they were build.



  • I'm running both version in the same machine, in the same session, under the same environment... "A snapshot of the CMake GUI is here...":https://docs.google.com/leaf?id=0B9kC5AeCp_q7ZThlYzg1N2QtY2Q1Ny00MmI4LTk3NzItYjg4YTFhMGFjZDc2&hl=en
    !https://docs.google.com/leaf?id=0B9kC5AeCp_q7ZThlYzg1N2QtY2Q1Ny00MmI4LTk3NzItYjg4YTFhMGFjZDc2&hl=en(Snapshot of my CMake generated GUI)!

    "A snapshot of the Qt GUI is here...":https://docs.google.com/leaf?id=0B9kC5AeCp_q7NWNkOTJlZmYtMGViNi00NThjLTg2MDUtMDFhNjdkZTNiYjA2&hl=en:
    !https://docs.google.com/leaf?id=0B9kC5AeCp_q7NWNkOTJlZmYtMGViNi00NThjLTg2MDUtMDFhNjdkZTNiYjA2&hl=en(Snapshot of my Qt generated GUI)!

    I wonder if it has something to do with this laptop not having a graphics card...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.