Results 1 to 11 of 11

Thread: Very new Qt user (couple of questions at end of message)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Mar 2008
    Posts
    27
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Very new Qt user (couple of questions at end of message)

    Quote Originally Posted by PUK_999 View Post
    I wasn't that keen on Qt because I had heard about the need to write impure C++ that gets run through a processor before the compiler sees it. The use of macros and global variables dissuaded me too.
    It's a necessary trade-off for cool things like introspection. The preprocessor (meta-object compiler) works great. Don't be scared of it

    Quote Originally Posted by PUK_999 View Post
    I was surprised to see the tr() function wrapping a string literal. For internationalisation I would've expected to see an integral value referencing an entry in a string table. I'm keen to see how the i18n works. Can anyone tell me in a nutshell?
    You'll often use Qt Linguist to create the actual translations. Qt Linguist will extract all the tr() (and some other to-be-translated strings like strings in your .ui files) and give you an interface for translating your apps. Linguist is quite useful. It automatically detects which strings have changed or were added at a later time, for example. It also matches your wording to previous strings. Translations also support arguments etc. See the Linguist manual for more info - it is a very complete manual http://doc.trolltech.com/4.5/linguist-manual.html

    Quote Originally Posted by PUK_999 View Post
    My application will be using a number of double-buffered OpenGL windows. I've seen there's a number of OpenGL examples. What essentially needs to be done to make a window drawable with OpenGL?
    You basically just have to create a widget which inherits from QGLWidget, and that's it OpenGL initialization should then take place in a reimplemented initGL() function and painting should happen in a reimplemented paintGL() function - although you can also do very cool stuff like mix QPainter's 2D painting API with OpenGL and render it all with OpenGL acceleration (see the overpainting example) or use the QGraphicsView with a QGLWidget viewport to render it all in OpenGL automatically. Qt provides very advanced features for these kinds of things actually -- it also just so happens that I started porting the NeHe tutorials to Qt 4, so if you want to see how to start with OpenGL stuff in Qt, you could take a look at it if you want - http://wesley.vidiqatch.org/03-08-20...apter-1-and-2/

  2. The following user says thank you to profoX for this useful post:

    PUK_999 (4th August 2009)

Similar Threads

  1. Logging Qt User Actions
    By Frank J. Lhota in forum Qt Programming
    Replies: 14
    Last Post: 30th May 2014, 21:36
  2. A couple of questions on installing Qt 4.5 on Windows Xp
    By rishiraj in forum Installation and Deployment
    Replies: 2
    Last Post: 3rd April 2009, 07:44
  3. treewidget and a message system
    By alisami in forum Qt Programming
    Replies: 7
    Last Post: 27th July 2008, 18:05
  4. Couple of questions: main window icon + toolbar icon
    By bpackard in forum Qt Programming
    Replies: 0
    Last Post: 20th March 2008, 19:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.