Andy Shaw

Qt Commercial Support Weekly #5: qmake and Giving Mac Some Love

11/29/2011 12:33 AM  | Posted by: Andy Shaw

As I have mentioned before in previous support weeklies, qmake is a powerful and useful tool. It is also one close to my heart as I have worked a lot on it in the past including the XCode 4 support that was done recently.

 

What came up recently in support is someone who wanted to provide a way to ensure that something was always recompiled when an application was built.  To do this manually you would need to do:

  touch main.cpp
  make

 

But, this is always prone to errors as you may forget to do the touch and also this case may be a rather simplified version of what you want to do with each build.  Luckily, what you can do is utilize the QMAKE_EXTRA_TARGETS directive and the PRE_TARGETDEPS variable inside your pro file to set something up.

 

QMAKE_EXTRA_TARGETS is useful for adding extra targets to your Makefiles so you can have something that builds a different part or does some other commands, but for this case we will just have a command that touches the main.cpp for us.  So the following can be done to do this:

 

updatemain.commands = touch main.cpp

QMAKE_EXTRA_TARGETS += updatemain

 

The commands part can contain whatever you want to do inside the target, then we just add the extra target to the list of QMAKE_EXTRA_TARGETS.  All that is left for us to do now is to ensure this is done before the target is built and thus ensure it gets recompiled.  To do this we add the extra target to the PRE_TARGETDEPS variable like:

 

PRE_TARGETDEPS += updatemain

 

After rerunning qmake it will invoke the updatemain.commands for us each time we make.

 

In other areas this week, we managed to fix a couple of Mac specific issues, one involving clicking on submenu entries in a menu in the menubar.  What would happen is that this would act as if an action had been invoked instead of doing nothing.  The other issue was with palette changes being lost when the application had been deactivated and then reactivated.  Both of these fixes are available via the support team, so just contact us via the Qt Commercial customer portal if you want any of these fixes.

 

Finally, if you happen to be in San Francisco for Qt Developer Days (Nov 29 - Dec 1) then please stop by the support desk and say hello!  I personally won't be there, but there are four eager support engineers waiting to help you with any questions you may have.

65 

Comments:

Clare Macrae | 11/29/2011 7:38 AM
Thanks for the qmake tip. As first written, the new command is 'touch.main.cpp'. Is that a typo? Surely the first '.' should be a space?

Andy Shaw | 11/30/2011 2:05 PM
Clare: That is indeed a typo, I'll get that fixed. Thanks for pointing it out and thanks for reading :)

Daysia | 12/5/2011 7:28 PM
Unparalleled accuracy, unequivocal clarity, and unedinalbe importance!

Kert | 1/28/2012 7:50 AM
Home run! Great sluggnig with that answer!

sxqhzzayqfi | 1/28/2012 2:24 PM
gpndwz jvbkunwzzcag

cambryn | 1/29/2012 5:32 AM
I see where you’re coming from, you want the best for your baby so to speak, but from my point of view it feels like you are just nitpicking little details. It’s not a great commercial, but I have to say it’s 100% better than most of the crap that gets shown on basic cable. (Head on, apply directly to the forehead!, etc) In fact, I had no interest in this type of software, and even though the script was a tad cringeworthy, in general the commercial did get me interested enough to actually think about whether I would use voice recognition if I had it and how it might help me.Looks like some really great software anyway. term life insurance rates

JacintoLA | 1/29/2012 7:21 AM
propecia 8-) ultram online drugs 024135

JacintoLA | 1/29/2012 7:21 AM
propecia 8-) ultram online drugs 024135

simplykimmie | 2/8/2012 11:21 AM
pennsylvania health insurance hwhhnw home insurance rates 469

GegiretsuAFAW | 2/9/2012 7:25 AM
small business insurance gbwne health insurance plans =)))

tenkurai | 2/15/2012 3:51 AM
infinity auto insurance kfdga car insurance rates 8-)

Hi5gloves | 2/20/2012 4:24 AM
Comment I was very pleased to find this website. I wanted to thank you for your time for this wonderful post!! I definitely enjoy reading it and I have you bookmarked to check out new stuff you blog post . life insurance quotes free auto insurance quotes

gutte | 2/22/2012 1:02 PM
| July 7, 2009 That is a faeutre of the player that displays the image before your video starts playing. The only way to prevent this is to not set the image variable. By default the plugin always sets it using the image that is displayed on your blog. 1.8 of the plugin should make that an option as well.

fmzejwwqrgw | 2/25/2012 2:30 PM
ZNEF8Q , [url=http://uexasluftkgf.com/]uexasluftkgf[/url], [link=http://xeznmxokqnsz.com/]xeznmxokqnsz[/link], http://izjeuzbyjgcc.com/

nozplbphogh | 2/29/2012 3:10 PM
XsmdcN cjdgqwrhtrtg

Bloxkcatel | 3/6/2012 11:17 AM
United StatePart of my job requires me to stay on top of this subject. The article you have written has been beneficial in my research. Thanks a lot Window Replacement Toronto

Patch | 3/7/2012 12:47 PM
Paki, aunque con retraso, te comunico que todos los que lo solicist teis a trav s de los coemntarios est is admitidos/as car insurance rates affordable car insurance

Kalin | 3/8/2012 10:24 AM
Paki, aunque con retraso, te comunico que todos los que lo solicist teis a trav s de los coemntarios est is admitidos/as auto insurance rates car insurance in florida

Jennica | 3/12/2012 5:00 AM
Paki, aunque con retraso, te comunico que todos los que lo solicist teis a trav s de los coemntarios est is admitidos/as classic car insurance cheap health insurance

rubi | 3/25/2012 10:38 AM
a command that touches the main.cpp for us. So the following can be done to do this: hccf

xaod | 3/26/2012 9:21 AM
How to update qmake qt3 with qmake qt4 for Linux Kernel 2.4? Please help ! Where to get the update patch. acne no more review


bwl fernstudium | 4/1/2012 3:19 PM
it gets recompiled. To do this we add the extra target to the PRE_TARGETDEPS variable like: bwl fernstudium

make your own website | 4/2/2012 8:38 AM
I have worked a lot on it in the past including the XCode 4 support that was done recently. make your own website

gutar | 4/3/2012 11:54 AM
we will just have a command that touches the main.cpp for us. So the following can be done to do this: Cheap Web Design

aric | 4/4/2012 2:32 PM
Hey! I just want to agree to get the huge good information that took place here in this blog. Maybe I'll come back to your blog from outside early. turbulence training review

lee | 4/4/2012 2:37 PM
Hello, I appreciate your work well there. psoriasis for life review I think it is great news for everyone. Thank you for participating stones and to keep in stock in the future.

gutar | 4/8/2012 1:39 PM
So the following can be done to do this: we will just have a command that touches the main.cpp for us. wall decals

star09 | 4/9/2012 1:11 PM
There are a lot of blogs and articles out there on this topic, but you have captured another side of the subject. Regards, Buy Essay Online

Virtual Office London | 4/11/2012 11:59 AM
te comunico que todos los que lo solicist teis a trav s de los coemntarios est is admitidos/as car insurance rates affordable car insurance Virtual Office London

accountant los angeles | 4/12/2012 8:35 AM
also this case may be a rather simplified version of what you want to do with each build. accountant los angeles

online slots machines strategy | 4/12/2012 1:47 PM
I have worked a lot on it in the past including the XCode 4 support that was done recently. online slots machines strategy

online slots machines strategy | 4/12/2012 1:51 PM
I have worked a lot on it in the past including the XCode 4 support that was done recently. online slots machines strategy

online slots machines strategy | 4/12/2012 1:51 PM
I have worked a lot on it in the past including the XCode 4 support that was done recently. online slots machines strategy

online slots machines strategy | 4/12/2012 1:52 PM
I have worked a lot on it in the past including the XCode 4 support that was done recently. online slots machines strategy

mike | 4/14/2012 10:45 AM
I personally won't be there, but there are four eager support engineers waiting to help you with any questions you may have. horoscope du jour gratuit

mike | 4/14/2012 10:48 AM
I personally won't be there, but there are four eager support engineers waiting to help you with any questions you may have. horoscope du jour gratuit

mike | 4/14/2012 10:49 AM
To do this we add the extra target to the PRE_TARGETDEPS variable like: horoscope du jour gratuit

mike | 4/14/2012 10:49 AM
I personally won't be there, but there are four eager support engineers waiting to help you with any questions you may have. horoscope du jour gratuit

Reebo | 4/14/2012 12:34 PM
so just contact us via the Qt Commercial customer portal if you want any of these fixes.格安 航空券 海外

http://www.raybantime.com | 4/17/2012 7:00 AM

Ray Ban sunglasses have appearedray ban outlet throughout hundredsray ban shop of films and haveray ban online shopbeen a favorite ray ban saleon the Hollywood scene for years,ray ban cats both on andray ban aviator off the screen. ray ban aviatorsWith timeless ray ban clubmasterand imaginative styles, ray ban 3025Ray-Ban consistently blendsray ban new wayfarer high-tech design,rb3025 lenses, and materials.wayfarer ray ban High quality, best prices,ray ban 2140 free shipping. Don't miss it!



seo services los angeles  | 4/18/2012 2:18 PM
now is to ensure this is done before the target is built and thus ensure it gets recompiled. To do this we add the extra target to the PRE_TARGETDEPS variable like: seo services los angeles

mike | 4/19/2012 1:26 PM
I wanted to thank you for your time for this wonderful post!

mike | 4/19/2012 1:27 PM
you with any questions you may have. radiology technician salary

california seo | 4/21/2012 7:58 AM
To do this we add the extra target to the PRE_TARGETDEPS variable like:california seo

Seo Glasgow | 4/25/2012 1:05 PM
Makefiles so you can have something that builds a different part or does some other commands, but for this case we will just have a command that touches the main.cpp for us. Seo Glasgow



louboutin020 | 4/29/2012 11:00 AM
The Shure SRH440 is a pair of studio monster beats meant for studio monitoring. So you can expect them to be very accurate and built to last. This is very true for the Shure SRH440, the plastic feels very sturdy and durable and even has a replaceable cord which is detachable. The pads can be replaced, too, and with the two main components, which are the cable and pads, which are prone to disintegration, replaceable, this makes the SRH440 a worthwhile investment especially for a pair you intend to keep with you for a long time.The SRH440 Beats by Dr Dre Monster Studio Red Diamond High-Definition On-Ear Headphones also comes with a pouch and a screw in inch adapter. I see no real need for a pouch as these are studio monster beats and are quite big. I cannot see myself using these as portable monster beats. The monster beats themselves are closed which means that they minimize the sound traveling in and out of the cups. They are also circumaural, which means that they sit around the ears as opposed to on top of the ears. This combination increases Monster Beats the comfort of these monster beats and isolation. These monster beats are also collapsible for portability, but do not fold flat.The cable is coiled so that one will not accidentally pull it out of a jack and damage it. It is also single sided so that it doesn't interfere with work. In reference to wires, there are also two exposed wires at the side of each cups, the pros are that adjusting the headband will not affect the wires/connection; the cons are that they are potential snag magnets. The headband is very flexible and is padded well, the top featuring the Shure logo prominently; however its construction which I find not round enough, puts a lot of pressure on the top of the head instead of distributing it well around the head. The pads on the other hand are made out of synthetic leather, they are initially comfortable but it gets really hot after a short period of usage. For me, I simply replaced the pads with the SRH840 pads, which are made up Monster Beats By Dr Dre Studio Maserati Headphone of memory foam and significantly raises the comfort level; this is something that owners might consider.The sound of these monster beats is neutral and accurate. Do not expect a lot of coloration in the music with these monster beats. Because they are not categorized under audiophile, they are catered more for home and studio recording, thus will work superbly with professional audio devices and an amp will boost their performance. One thing that I have noticed when listening to these monster beats is how accurate they are, nothing over the top,. The highs sounded clear and detailed, the mids were clear especially when listening to vocals, the bass had a tight thump that met my standards. Overall for sound, if you like a laid back sound which is accurate and detailed, these are great. Bass lovers or people wanting to drive aggressive music might have to consider another headphone. Another thing that stood out was the soundstage, which was wide and had a lot of depth to it which allowed the treble, mids and bass to be easily separated. I understand why these are popular for studio recordings with its detailed and accurate sound; they can easily bring out flaws in bad recordings. Music lovers however might want that extra coloration for a better punch and kick to the music. The isolation with these monster beats is also good with hardly any sound leakage in and out in normal environments.If I were to summarize the monster beats, I would say that they are perfect for studio monitoring especially with their clarity, Beats by Dr. Dre LeBron James Limited Edition Headphones Gold detail and accurateness. A typical listener who is using these monster beats for music might be disappointed as they are not fun enough. These monster beats will impress those who seek neutral and accurate sound and it is a real bargain for that area, but it will not make casual listeners seeking a fun sound to jump up and down for joy. It really boils down on how you like to listen to your music and what you are using these monster beats Cheap Monster Beats for.


Adam | 4/29/2012 12:29 PM
I have worked a lot on it in the past including the XCode 4 support that was done recently. онлайн казино

Adam | 4/29/2012 4:53 PM
EXTRA_TARGETS directive and the PRE_TARGETDEPS variable inside your pro file to set something up. seo company los angeles

SDGFD | 4/30/2012 9:26 AM

In spite of the actuality that cheap prada shoes this wallet is considerable for the price, it has enough safe-keeping space that will help you store all of your requirements.Have you actually walked previous a artist prada men shoes prada bags catalogue 2011 shop, looked using the window show and felt as although a bag was calling you by name?Or possibly you occur to prada high top sneaker ascertain it in an extremely catalogue? That's a prada http://www.cheappradashoesonsale.com/ bag for you! So Prada Men beautiful, you really feel like its calling you to definitely exclusive it They are they height of design and sophistication. in the celebration you really are a female who understands her God supplied best to glance beneficial and really feel good, owning a prada br4253Men Canvas bag, you are much over halfway there. You will Men Casual Shoes cause heads to turn for sure, and for each of the greatest reasons.

How Men T-shirts about that you'll have it with you for the up coming prada backpack many Men Sneakers years and more? A prada bag is sometimes a existence partner. It doesn't stop trying on you right up until you stop trying on it, and hopefully for an extra High Top Men Sneakers prada bag. as well as though you do give it up, the up coming female along the collection to obtain it could possibly be producing utilization Patent Leather Shoes of it for relatively a prolonged time.


SDGFD | 4/30/2012 9:29 AM

In spite of the actuality that cheap prada shoes this wallet is considerable for the price, it has enough safe-keeping space that will help you store all of your requirements.Have you actually walked previous a artist prada men shoes prada bags catalogue 2011 shop, looked using the window show and felt as although a bag was calling you by name?Or possibly you occur to prada high top sneaker ascertain it in an extremely catalogue? That's a prada http://www.cheappradashoesonsale.com/ bag for you! So Prada Men beautiful, you really feel like its calling you to definitely exclusive it They are they height of design and sophistication. in the celebration you really are a female who understands her God supplied best to glance beneficial and really feel good, owning a prada br4253Men Canvas bag, you are much over halfway there. You will Men Casual Shoes cause heads to turn for sure, and for each of the greatest reasons.

How Men T-shirts about that you'll have it with you for the up coming prada backpack many Men Sneakers years and more? A prada bag is sometimes a existence partner. It doesn't stop trying on you right up until you stop trying on it, and hopefully for an extra High Top Men Sneakers prada bag. as well as though you do give it up, the up coming female along the collection to obtain it could possibly be producing utilization Patent Leather Shoes of it for relatively a prolonged time.


alex | 4/30/2012 10:18 AM
I would really want to see this person directly and learn from him how to be such a good man like him. I learned from the story behind the campaign that it was his own personal experience that made him want to give a free hug to just anyone who wants and needs it. oakville homes for sale

lost without you lyrics | 4/30/2012 1:31 PM
Luckily, what you can do is utilize the QMAKE_EXTRA_TARGETS directive and the PRE_TARGETDEPS variable inside your pro file to set something up.lost without you lyrics

Martin | 4/30/2012 5:01 PM
I have worked a lot on it in the past including the XCode 4 support that was done recently. clubs in hollywood

optimizare site | 5/1/2012 10:34 AM
commands, but for this case we will just have a command that touches the main.cpp for us. So the following can be done to do this: optimizare site

louboutin020 | 5/2/2012 9:44 AM
The Beats By Dre Monster Tour In-Ear With ControlTalk Purple topic of running with monster beats can polarize a crowd of runners faster than almost any other topic.First, I am generally not a fan of running with monster beats or having music playing in the background when I run (such as on a track or treadmill.)If I were to do a longish run inside on an indoor track, where I would not have any goals in terms of pace or stride, then I might consider listening to some podcasts. However, no matter how often I say that, I still have not experimented with actually running with monster beats.I may not be a fan of wearing monster beats when I run (or do any other types of workouts) but I do not have any problems with other people that wear monster beats when they work out. Not in principal, at any rate.My general rule of thumb, Monster Beats and this applies to almost anything, is that your right to wear monster beats ends where my safety is compromised. People who can run responsibly with monster beats make up the vast majority, in my experience. The people who Monster Beats by Dr. Dre Studio Pittsburgh Steelers Baby Blue Color are completely oblivious of anyone and anything are the people that you remember, though.Here is a handy table about why or why not you might want to wear monster beats when you workout, gleaned from the various arguments that I have seen about using them.Running w/o monster beatsI do not want distractions.I do not want outside influences on my pace.I enjoy having the time to think.Running without monster beats is safer than running with them.I'm a social animal; I enjoy Monster Beats By Dre Ferrari talking with the people around me when I run.Having had regular bouts of blindness, I am paranoid about losing my hearing.I do not want to be oblivious to those around me, causing traffic jams and accidents.Most races have rules against using monster beats on the course.Running w/ monster beatsSome people can't bring themselves to run without a distraction.Some people do not have the experience to properly pace themselves.Some people enjoy not having to think for a little while.Adults have the right assess how much risk they are willing to take.I'm sure some of the people around me would wish I'd shut up while they are running.Some people do not think about going deaf or will run with the volume suitably low.Some people show a bit of consideration when running with monster beats.Some races do not have a rule against monster beats, and most races do not really enforce the rule.It is a small list, but almost every argument comes down to one of degree. Some people prefer to be social while they run, some prefer solace. Some people can manage to safely navigate busy streets and pedestrian walkways without inconveniencing others or jeopardizing their safety, while others can not.For myself, I could see an occasion when I might try to further my education by listening to a podcast or a lesson, but the few times that I have run with music makes me less inclined to even try. It is too disruptive to the reason that I run, which is to spend time with myself and Cheap Monster Beats explore my limits. Maybe that is the competitive side of me; I do not run to be healthy. That is just a happy side effect.What it boils down to in my mind is how much does your need for monster beats infringe upon other people I have seen the argument that people that use monster beats are not real runners, but I do not agree with that statement at all.I prefer George Sheehan's definition of a runner, even though it had nothing to do with people wearing monster beats. "The difference between a runner and a jogger is an entry blank."

Joy | 5/3/2012 4:32 PM
So the following can be done to do this: wont go home without you lyrics

Coach Clearance | 5/4/2012 5:28 AM
Out Coach Clearance shop is a profession, reliable Coach Factory Outlet supplier. We expanded our business online in 1941, through 71 years hard working; we have become one of the top progressive the Coach Bags outlet website, and won lots of customers from all over the world. We have a large selection of Cheap Coach Online products, We devote ourselves to offer all customers excellent customer's Coach Factory Outlet service. As a global security online shopping website, we have lots of advantages to you.All Cheap Coach Online bags and Coach Clearance Outlet purses on sale are real!And our Coach Clearance Purses website do sales promotion at kinds of festivals!We are wholesaler specialized in famous Coach Factory Outlet bags,we earn little profit in order to establish good business relationship with you.


Adam | 5/4/2012 12:17 PM
This is a tremendous step forward in improving the culture of world changers and we’re excited and proud to be a part of it. personal essay

Coach Outlet Canada | 5/5/2012 7:56 AM
Welcome to buy

Cheap Coach Purses

for sale online if you want to get the best price for your dream coach on

Coach Purses Outlet

.

Coach Online Outlet

have various types for your choices in

Coach Purses Outlet

, you'll find selections to meet any budget from

Coach Outlet Online

. Here are some detailed of discount

Coach Online Sale

.Elegant and noble will be the distinctive characteristic of authentic
User verification Image for user verification  
     

Tags

Archive

Authors

Pasi Matilainen

Pasi is a Software Specialist working at Digia, Qt Commercial R&D and he concentrates on Mac OS X development. Pasi holds an M.Sc. degree in Information Technology from the Tampere University of Technology, Finland.

Tarja Sundqvist

Tarja is a Senior Software Engineer in the Digia, Qt Commercial Support team. She has been working in Digia for over 10 years in various positions: software development, testing, error management. Now, Tarja is focusing on helping Qt Commercial customers with their daily Qt problems on Windows and Linux platforms. Tarja holds an M.Sc. degree in Information Processing Science from the University of Oulu, Finland.

Akseli Salovaara

Akseli is a Software Specialist at Digia, Qt Commercial R&D and is responsible for the Qt Commercial releases and deliveries. Akseli holds an B.Sc. degree in Information Technology from the University of Applied Sciences in Jyväskylä, Finland.

Samuli Piippo

Samuli is a Software Specialist at Digia, Qt Commercial R&D with a concentration on  embedded Linux and RTOS development. Samuli holds an M.Sc. degree in Information Processing Science from the University of Oulu, Finland.

Katherine Barrios

Katherine is the Marketing Manager at Digia, Qt Commercial. She is responsible for getting the word out about Qt Commercial to the Qt ecosystem and working together with our customers and the Qt community to further extend the love for Qt on desktop and embedded. She was previously employed at Nokia, Qt Development Frameworks as Program Marketing Manager and is based in Oslo, Norway.

Sami Makkonen

Sami is a Senior Product Manager working at Digia, Qt Commercial R&D and he is responsible for the product planning including new feature development and enhancements to existing functionality. Sami holds an M.Sc.(Econ.) degree in Computer Science.

Andy Shaw

Andy is the Head of Support at Digia, Qt Commercial and has been working with Qt and supporting customers using Qt for 11 years.  He thrives on solving customer problems and getting feedback from them.

Tuukka Turunen

Tuukka is the Director of R&D at Digia, Qt Commercial and is responsible for the planning, creation, verification and delivery of the Qt Commercial product. Tuukka holds a M.Sc.(Eng) and Licentiate of Technology degrees in Computer Science.

Qt Commercial Team