Search Results

Search found 10 results on 1 pages for 'eaigner'.

Page 1/1 | 1 

  • QWidget keyPressEvent override

    - by eaigner
    Hi there, I'm trying for half an eternity now overriding QWidgets keyPressEvent function in QT but it just won't work. I've to say i am new to CPP, but I know ObjC and standard C. My problem looks like this: class QSGameBoard : public QWidget { Q_OBJECT public: QSGameBoard(QWidget *p, int w, int h, QGraphicsScene *s); signals: void keyCaught(QKeyEvent *e); protected: virtual void keyPressEvent(QKeyEvent *event); }; QSGameBoard is my QWidget subclass and i need to override the keyPressEvent and fire a SIGNAL on each event to notify some registered objects. My overridden keyPressEvent in QSGameBoard.cpp looks like this: void QSGameBoard::keyPressEvent(QKeyEvent *event) { printf("\nkey event in board: %i", event->key()); //emit keyCaught(event); } When i change QSGameBoard:: to QWidget:: it receives the events, but i cant emit the signal because the compiler complains about the scope. And if i write it like this the function doesn't get called at all. What's the problem here?

    Read the article

  • Get CALayers view

    - by eaigner
    Hi, is it somehow possible to get the nearest "container" NSView of a CALayer? My problem is I'm managing tracking areas in my "container" NSView, and those need to be updated if a layer is moved/added etc. and i would like to automate that somehow instead of calling my -updateTrackingAreas function manually. Regards, Erik

    Read the article

  • Intercept method calls in Python

    - by eaigner
    Hi. I'm implementing a RESTful web service in python and would like to add some QOS logging functionality by intercepting function calls and logging their execution time and so on. Basically i thought of a class from which all other services can inherit, that automatically overrides the default method implementations and wraps them in a logger function. What's the best way to achieve this?

    Read the article

  • Git history cleanup doesn't seem to have an effect

    - by eaigner
    Hi, i ran the following 2 commands to clean up .pbxuser and .mode1v3 files from my git repository, but afterwards when i e.g. fire up gitx i can still see them in the history. git filter-branch --tree-filter "git rm -rf --cached --ignore-unmatch *.pbxuser" HEAD rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune What did i misunderstand here? The commands seem to do the job but why is gitx still viewing the diffs in its history? Regards, Erik

    Read the article

  • Write to XCode build transcript.

    - by eaigner
    Is there any way to write to the XCode build transcript? What i want to do, is throw a warning if a device is not attached to the computer instead of an assertion failure in my unit test cases (some cases rely on an attached ipod). I thought of something like the standard compiler warnings (only with custom message). Thanks.

    Read the article

  • Blur CALayer's Superlayer

    - by eaigner
    Hi. I've got a CALayer and a sublayer in it. What i want to achieve is a blur of the superlayer (the area under the sublayer), just like the standard sheets do it. I've tried to set a .compositingFilter on the sublayer but this doesn't seem to work. Any ideas how to solve this?

    Read the article

  • CALayer not obeying object ownership rules?

    - by eaigner
    I have a custom CALayer - UIProgressLayer - for simulating a progress bar. There is a dispatched GC timer involved to animate its intermediate state. So thats the layer I'm talking about here, although i don't think the problem is restricted to this particular subclass because a CALayer with only the -release and -dealloc overridden produces the same outcome. The problem is when i send this layer, for instance, a theLayer.opacity = 0.5f a -release message is sent to the layer, thus deallocating my layer. Why is this happening? Has it something to do with how the whole CA system works? But it still has to obey the object ownership rules right? I was thinking maybe it creates a copy of that layer for the fading, but that's not the case.

    Read the article

  • mootools: $ not defined

    - by eaigner
    I've strange error i don't understand. I'm just moving my code from jQuery over to Mootools because it's much cleaner than the jQuery mess. Now when i use the $$('div.canvas') in mootools i get the correct element. When i try $(document).getElement('div.canvas') it tells me that $ is not defined. How can $$ and all helper functions like $lambda etc. be defined but not $? Has something changed there from 1.1 to 1.2 and the docs are not updated yet?

    Read the article

1