Skip to content

C++ Gurus

The forum for all discussions in C++ land.
1.3k Topics 8.5k Posts
  • QGLWidget and QGraphicsScene Program Crash

    6
    0 Votes
    6 Posts
    5k Views
    D

    [quote author="cazador7907" date="1296309277"]
    So, how would I set a jpg image as overlay dialogs, buttons, lines and the like?

    Laurence -

    [/quote]

    I'm not getting it... do you have all of that in a QGraphicsScene or as ordinary widgets? Where and how is OpenGL involved in this?

  • 0 Votes
    3 Posts
    7k Views
    M

    Thanks Tobias.

    Adding this to destructor helps:

    @
    m_vEtoken->clear();
    m_eItem.clear();
    @

    I'am reading book about smart pointers and getting started with QT. Next i will be more attentive to this.

  • 0 Votes
    3 Posts
    3k Views
    L

    Thanks for the quick reply.

  • 0 Votes
    11 Posts
    8k Views
    P

    I moved the headers, and I found that the problem might lie in the classes. They reference some classes that also use winserialport.h and other classes. I think there might be a class that uses startpage so I changed the class name and the associated files and all is well. Now I ran accross another problem. But I will start a new post. I am not sure if it should be in QT or here in C++ I think it should go in QT as the error references a qt file.

    Thanks for your help.

  • 0 Votes
    3 Posts
    4k Views
    A

    Hi Gerolf,

    Thanks a lot for help. I used dependency walker and found that DFORRT.DLL was missing. I copied this DLL to System 32 directory. Now I am able to load DLL and run function.

    thanks,
    Azghar

  • Pre allocation of memory

    18
    0 Votes
    18 Posts
    10k Views
    G

    But that only helps if you are deleting the objects.

    I think the intention was:

    using a QVector which is storing objects and using pointers on those objects. And there it definitly does not work.

  • [Moved] Include files

    4
    0 Votes
    4 Posts
    3k Views
    I

    For even faster (much) compilation, and some other nice side-effects (like binary compatibility for libraries) see the "d-ptr paradigm (Opaque pointer)":http://en.wikipedia.org/wiki/Opaque_pointer

    As far as the compilation speed goes - this way you can minimize the number of includes (a small speed boost) and you can change classes(1) without having chain reactions to recompile everything that uses them (big speed boost).

    --

    (1) naturally, doesn't apply to all changes

  • [Moved/ANSWERED] STL::Map

    2
    0 Votes
    2 Posts
    3k Views
    B

    You can do this with map or multimap containers, or you can creat your own container if you know somethink about OOP and templates :) it is fun and when you end container you will be pround :) but faster way is use one of containers from STL

  • [ANSWERED] Include Files

    18
    0 Votes
    18 Posts
    10k Views
    W

    [quote author="Tobias Hunger" date="1294679366"]Wolf P.: You only use two compilers? You are lucky then![/quote] How many compilers do you use?
    BTW: this sounds like a suggestion for one of our next polls ;)

  • [ANSWERED] Operator Overloading with Pointers

    9
    0 Votes
    9 Posts
    10k Views
    P

    Sorry, if I wasn't clear. I made two suggestions to solve your problem and the longer i think about the first one the less I like my own solution. Because it would work in another way than the standard library and thus may confuse readers of your code.

    I as an user of your binary heap would expect that the implementations calls operator<(T, T) for all possible T in the same way.

  • 0 Votes
    20 Posts
    16k Views
    G

    Peppe, your right. I mixed up things from what I looked up in the sources some times ago. The layout only keeps book of the widgets it manages, but does not take ownership.

    But what's really important for the users: After the UI is set up, all parent-child relationships are correct. I really do like Qt :-)

  • 0 Votes
    6 Posts
    15k Views
    F

    Wooh!
    Kind of Holiday/Vacation presents all these posts, now that I came from vacation. Thank you all for the support