June 13, 2011

iamcreasy iamcreasy
Lab Rat
32 posts

I can’t find the Example Demos

Page  
1

I can’t find the example demo in my QT installation.

But I’ve installed it, as I can see it in the Maintain QT SDK.
Pic

They are not under the Qt 4 submenu. As stated in the doc.

26 replies

June 13, 2011

steno steno
Ant Farmer
134 posts

Now that seems odd…

June 13, 2011

loladiro loladiro
Lab Rat
596 posts

You can always find them in the Examples subfolder of your QtSDK installation.

June 13, 2011

iamcreasy iamcreasy
Lab Rat
32 posts

Yeh, the sources are there. But I was looking for an executable which allows the user to test the examples without going through the building process.

I have used QT before, but that a long time ago. Then, it came with compiled examples.

June 13, 2011

Eddy Eddy
Gene Splicer
1296 posts

There is no executable for qtdemo anymore in the sdk.

But as you have choosen to install them you should find a map with the sources and a .pro file.

Your other choice is using qt Creator’s welcome screen. That way you can open the same sources and compile there.

It’s a pity they are not installed anymore because they help a lot to find the right examples.

 Signature 

Qt Certified Specialist
Qt Ambassador

June 13, 2011

iamcreasy iamcreasy
Lab Rat
32 posts

Is there any script or make file, using which, I can batch compile all of those? and make a single executable before, like what QT provided before.

June 13, 2011

Eddy Eddy
Gene Splicer
1296 posts

I haven’t done it myself because i still have an old installation with the executable.

But you should be able to compile it using

  1. qmake -project
  2. make
  3. Install

In the directory where you find the qtdemo.pro file.(is that the correct Filename?,i’m just posting from my mobile wihout the sources at hand)

 Signature 

Qt Certified Specialist
Qt Ambassador

June 13, 2011

iamcreasy iamcreasy
Lab Rat
32 posts

I tried to build the example (in QT Creator, Build > Build Project “examples”) opening the examples.pro, but it gave me the following 4 warnings and errors.

Warning:
C:\QtSDK\Examples\examples-build-desktop\graphicsview\portedasteroids\..\..\..\4.7\graphicsview\portedasteroids\ledmeter.cpp:-1: In member function ‘virtual void KALedMeter::paintEvent(QPaintEvent*)’:

C:\QtSDK\Examples\examples-build-desktop\graphicsview\portedasteroids\..\..\..\4.7\graphicsview\portedasteroids\ledmeter.cpp:146: warning: comparison between signed and unsigned integer expressions

Error
:-1: error: cannot find -lpnp_basictoolsd

:-1: error: collect2: ld returned 1 exit status

and it stopped.

Why there would be any error.

Edit : Im gonna try with the demos.pro

June 13, 2011

iamcreasy iamcreasy
Lab Rat
32 posts

I tried with, demos.pro, it gives me the following error,

C:\QtSDK\Demos\demos-build-desktop\shared\..\..\4.7\shared\arthurwidgets.cpp:54: error: private/qpixmapdata_p.h: No such file or directory

this shouldn’t be! :(

June 13, 2011

loladiro loladiro
Lab Rat
596 posts

Same here regarding the demos (I didn’t investigate any further though)

June 13, 2011

iamcreasy iamcreasy
Lab Rat
32 posts

got an idea, I can install the old version to get the demos. :D

but, that’s not a solution anyway :P

@loladiro do you face the same thing for both examples.pro and demos.pro

there is another qtdemo.pro inside Demos/qtdemos, but it doesn’t compile too.

June 14, 2011

jim_kaiser jim_kaiser
Lab Rat
144 posts

@loladiro @creasy.. Let me clear this up.. AFAIK this is a difference in Qt sources in Linux and Windows. In linux, we have a seperate include folder with the headers.. The private folder in this include seems to exist in QtSDK/Desktop/Qt/471/gcc/ and QtSDK/Desktop/Qt/472/gcc/ but not the 473.

June 14, 2011

loladiro loladiro
Lab Rat
596 posts

Ok, the examples are compiling without any problem and the demo error is a known bug [bugreports.qt.nokia.com]

Edit: @jim_kaiser: How come you always post when I’m just writing mine. But you’re right, it is platform dependent (see also the bugreport I linked to). However, I still think that linking to private headers is bad practice since those are not part of the public API and can be changed or removed.

EDIT2: Correction. I was a little early to claim the examples were compiling. In fact I get the same error.

June 14, 2011

jim_kaiser jim_kaiser
Lab Rat
144 posts

But hey… i just compiled the qtdemo.pro and it worked. Qt Creator 2.2.0 .. SDK 1.1.1

[Edit: Sorry.. I assumed we were talking about Linux.. Works in Linux. In Windows I should check.. tomorrow at work! But yeah mostly it should just be about adding an include directory maybe..]
[Edit again: Okay known bug… I shall rest..]

June 14, 2011

loladiro loladiro
Lab Rat
596 posts

I’m on Linux (Ubuntu), but according to the bug report, the private header file is not needed on Windows.

June 14, 2011

jim_kaiser jim_kaiser
Lab Rat
144 posts

@loladiro: It doesn’t compile on linux for you? Works for me.. And hehe… we do tend to post simultaneously! And yeah the private files are probably not needed.. We do link to one in our application at work… but we also maintain our patch in the related classes each version.. so thats okay :P. Could you check if using “QtGui/private/qpixmapdata_p.h” works? In case the sub dirs are not added in the include path. But if not needed on Windows as the bug report says.. can be commented i presume.

Page  
1

  ‹‹ ODBC works on Windows not on MAC      [Solved] How to initialize QString with Unicode Characters? ››

You must log in to post a reply. Not a member yet? Register here!