Quantcast
Channel: User koan - Stack Overflow
Browsing latest articles
Browse All 40 View Live
↧

Comment by koan on Sign a Framework for OSX 10.9

Codesigning has changed again for 10.9.5; please see the excellent post at permalink.gmane.org/gmane.comp.lib.qt.devel/18480 for info on how to set up the correct Qt framework directory structure and...

View Article


Comment by koan on How do I set the icon for my application's Mac OS X app...

@Noitidart Try re-registering your application with Launch Services: /System/Library/Frameworks/CoreServices.framework/Frameworks‌​/LaunchServices.fram‌​ework/Support/lsregi‌​ster -f...

View Article


Comment by koan on Properly seeding rand_r(int *val) method

@user1742385, rand_r modifies the parameter and you are passing it a temporary variable that will go out of scope as soon as the rand_r function is entered. You should create a variable for your seed...

View Article

Comment by koan on Some FontAwesome icons are not appearing

Open your site in Firefox and open the web console in Tools/Web Developer menu. The messages I saw helped me debug my FA problem.

View Article

Comment by koan on Static Code Analyzer for C++ in Linux

Check out clang -Weverything but be aware that there will be a lot of false positives

View Article


Comment by koan on XPC service array crashes

You can see in my question the size of data that I want to deal with. This is not a service run, I'm simply transferring some data from a subprocess.

View Article

Comment by koan on SHA256 implementation in c

I just built this code on MacOS 10.11.3 and I got the expected result, so unfortunately for you, I'll be downvoting your answer.

View Article

Comment by koan on Qt: Unicodes / Utf-8 in QString takes for ever (12...

I would say that rendering of Thai letters is not an issue in Qt. The fact is that you are trying to hack an issue, you don't know what the algorithm in Qt for breaking lines is and there is an...

View Article


Comment by koan on Texture losing binding

@thokra I only introduced glIsTexture to help debug the code. How do I properly check that my texture is in memory ? glTexImage2D does not return a value. And why would glIsTexture fail in my main...

View Article


Comment by koan on Tools for JPEG optimization?

@niceass How do you know that JPEGmini is using ImageMagick code ? Knowing the quality factor is the same as output from IM is not proof. My guess is that they recompress the image at reducing quality...

View Article

Comment by koan on Rendering thai characters with tags breaks on Apple devices?

I thought if you convert to HTML entities (อัน) then wrap a b tag around the first one it would work. But it failed in Safari and Firefox (macOS).

View Article

Comment by koan on Change scrollbar colours

Thanks for your answer; it didn't work for me. I dragged the images from ThemeEngine to a Finder window and it copied PNGs. I edited them and dragged them back then saved a new car file. Then I copied...

View Article

Comment by koan on Template Matching using FFT

I had to edit my answer; image padding can be used to interpolate correlation results, which is another problem. Generally, when matching a smaller template to an image then the template is padded and...

View Article


Comment by koan on Window won't close

orderOut by itself did not seem to help so I implemented both the suggestion of @KenThomases and @JWWalker - add an outlet for the window and use orderOut on it and that seems to work.

View Article

Answer by koan for Subprocess icon bounces in dock

I ended up rewriting the subprocess as a MacOS XPC service. In the XPC service's property list I added LSBackgroundOnly to get Launch Services to ignore system event handling.

View Article


Subprocess icon bounces in dock

My application starts a subprocess program to read video using the QuickTime framework via fork() and pipes. The subprocess goes into a wait loop when it is not busy, i.e. it does usleep until there is...

View Article

Answer by koan for Using a NSSavePanel from Qt for a native save dialog

The reason why the tags field is shown under Mavericks is that the following line is wrong:if([panel respondsToSelector:@selector(setShowsTagField)])The setShowsTagField takes an argument so the...

View Article


Using a NSSavePanel from Qt for a native save dialog

The code below works most of the time, maybe a more experienced Objective C++ programmer can help me:Issue 1: When called from specific menu QActions, the system starts to animate the dialog into...

View Article

Static analysis strange result

I was investigating the use of magic numbers and I have simplified my experiment to the following program. I noticed that when I use the static analysis function in Xcode I get the message "Left...

View Article

Answer by koan for Qt not letting me create a menu item named after my app...

I don't know about Python; but on the Mac you create About, Preferences or Quit menu items and Qt will automatically shift them into the application menu on the left (the one with the bold text).I'm...

View Article

Answer by koan for Image Processing How to Apply gradient [-1 | 0 | 1 ] to...

From your code; you are trying to calculate gradient from RGB but there is nothing to indicate how RGB is stored in your image. A complete guess is that in your image you have BGRBGRBGR...etc.In that...

View Article


Answer by koan for makefile with OS dependent compiler

If you are compiling on MacOS X and Linux then you can put the following in your makefile:UNAME := $(shell uname)ifeq ($(UNAME), Darwin)CFLAGS = -Ofastendififeq ($(UNAME), Linux)CFLAGS = -O3endif# etc

View Article


Read uncompressed AVI using libavcodec

I am trying to read an uncompressed AVI file - basic uncompressed AVI are BGR bitmaps.if(frame.format == AV_PIX_FMT_BGR24){ int data_size = frame.linesize[0]*frame.height; my_data_ptr = new uint8_t...

View Article

Answer by koan for Read uncompressed AVI using libavcodec

The negative line size indicates that the frame is inverted (raw AVI are coded this way).The data pointer points to the top line and if you add the negative linesize to the pointer you get to the next...

View Article

Answer by koan for Can't load Font Awesome from subdirectory

It looks like this is a known issue, due to "same origin" security policy, see https://bugzilla.mozilla.org/show_bug.cgi?id=760436The reason why the site works after loading the higher level page is...

View Article


Sign a Framework for OSX 10.9

After using macdeployqt I sign my application to avoid Gatekeeper problems.I can use codesign on all the frameworks and everything inside the bundle but when I come to sign the bundle I get an error:$...

View Article

Qt Stylesheet for QMessageBox

I am using stylesheets. I want to set style information for the main message text and the informative text for a QMessageBox. Is it possible to access these sub-controls ?

View Article

Menu delay for QToolBar

I have a menu on a QToolBar by making a QAction and adding a QMenu to it. How can I remove the delay before the menu appears when you click on the icon ?QToolBar *myToolBar = new QToolBar(this);QAction...

View Article

Can't load Font Awesome from subdirectory

I have the following file layout:/website/index.html/website/font-awesome/css/website/font-awesome/fonts/website/Subdirectory/page1.htmlThe page /website/index.html does not use Font Awesome at all;...

View Article



Answer by koan for Qt on Mac -- how to access "search" in help menu

If you add a Help menu to your application, Qt will automatically add the search box. See http://doc.qt.io/qt-4.8/mac-differences.html#menu-bar

View Article

XPC service array crashes

I'm using the C interface for XPC services; incidentally my XPC service runs very nicely asides from the following problem.The other day I tried to send a "large" array via XPC; of the order of 200,000...

View Article

Answer by koan for Get the correct graphical representation of Thai...

As you have discovered in the comments to your question, it does not make sense to render a combining character or NSM without at least a consonant in the current character cell.Therefore you cannot...

View Article

Answer by koan for Right justify string containing Thai characters

It looks like the rjust() function will not work for you and you will need to count the number of cells in the string yourself. You can then insert the number of spaces required before the string to...

View Article


Answer by koan for Splitting Thai text by characters

For clarification of the previous answers, the issue you have is that the missing characters are "combining characters" - vowels and diacritics that must be combined with other characters in order to...

View Article

How to overwrite file locked by QuickLook

On OSX, some applications can overwrite files that QuickLook is keeping a lock on.For example, open a Finder window and select a video file; then process a video with Handbrake and overwrite the same...

View Article

Change scrollbar colours

I want to change the scrollbar colours for my Mac application. Specifically, I want to change the background colour.My application is Qt based so the application will already be created and running. I...

View Article


Answer by koan for What is "energy" in image processing?

There is more than one definition of "energy" in image processing, so it depends on the context of where it was used.Energy is used to describe a measure of "information" when formulating an operation...

View Article


Get number of frames in a video via AVFoundation

I'm trying to find the number of frames in a video I've just opened, without decoding all the frames.I open with AVAsset and then get an AVAssetTrack for the video. What next ?

View Article

Answer by koan for How does one obtain image buffers in their original format...

Like you I expected that setting an outputSettings of nil would result in output of native format video frames but this is not the case, you must specify something in order to get a valid...

View Article

Answer by koan for How to open a particular file with my QT application on...

You need to set up your Information Property List file (Info.plist) in your application bundle to identify files that can be opened by your app. See...

View Article
Browsing latest articles
Browse All 40 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>