Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. os x
    Log in to post

    • SOLVED Qt 5.9 built with Glib support under macOS - event loop doesn't work
      3rd Party Software • os x mac os glib • • Melanie  

      5
      1
      Votes
      5
      Posts
      1178
      Views

      Thanks for the link !
    • SOLVED Plugin "qtquickcontrolsplugin" not found
      QML and Qt Quick • qml qtquick os x macdeployqt • • Spencer  

      6
      0
      Votes
      6
      Posts
      3129
      Views

      Yes it is, but I just saw I misunderstood how you used it. There's been cases where developer gave the Qt installation QML path. Can you share your QML imports ? There might be something there that could be useful to understand why not everything needed was included.
    • UNSOLVED OS printing error
      General and Desktop • os x qprinter • • geor  

      2
      0
      Votes
      2
      Posts
      570
      Views

      Take a look at QtRPT print report engine and QtRptDesigner. May be it help you. You can fint QtRPT at http://www.qtrpt.tk
    • UNSOLVED Cannot get valgrind to work in Qt Creator 4.0.1 on OS X 10.11.5
      Tools • qt creator os x valgrind • • Guy Gizmo  

      1
      0
      Votes
      1
      Posts
      786
      Views

      No one has replied

    • UNSOLVED OS X Unified toolbar Preferences not working
      General and Desktop • os x unified toolbar • • Joel Bodenmann  

      3
      0
      Votes
      3
      Posts
      1161
      Views

      @VRonin Thank you for your suggestion! Interestingly that doesn't have any effect. The application still uses the unified menubar. I set the attribute like this in my main() before I construct and show the QMainWindow: QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true); Interestingly I get the following debug messages in the application output pane when opening and closing the application when the attribute is set to true: Menu item is already in a menu, remove it from the other menu first before inserting Menu item is already in a menu, remove it from the other menu first before inserting Menu item is already in a menu, remove it from the other menu first before inserting Menu item is already in a menu, remove it from the other menu first before inserting Item to remove does not belong to this menu Item to remove does not belong to this menu Item to remove does not belong to this menu Item to remove does not belong to this menu I also tried QMainWindow::setUnifiedTitleAndToolBarOnMac() but without any success either. The application still uses the unified toolbar. I'm using Qt 5.6 on OS X 10.11.4 (El Capitan)
    • UNSOLVED Qt Creator: application output in a separate window, instead of the output pane?
      Tools • qt creator os x output • • Guy Gizmo  

      6
      1
      Votes
      6
      Posts
      3806
      Views

      Wasn't expecting this thread to get resurrected! I'm glad to see there's a feature I can vote for to have this ability added to Qt Creator. I've dealt with this in the meantime by enabling "run in terminal" in all of my project's run settings and then setting my terminal in Preferences > Environment > System > Terminal to a custom script that uses whichever terminal window is the closest to the lower right corner of my desktop. (That's where I want my program output to go.) This lets me effectively have it be in a separate window from Qt Creator that I can position wherever I like. I'm running macOS so my solution only works for that, but in case anyone wants it, here's the script I'm using to do the above in iTerm2: #! /bin/bash # ugly escaping: for apple script \ and " need to be escaped, whereas %q takes care of all bash escaping declare -a args mydir=`pwd` mydir=$(printf '%q' "$mydir") mydir="${mydir//\\/\\\\}" args[0]="bribriSaveDir=\`pwd\`; cd ${mydir//\"/\\\"}; " # args[0]="cd ${mydir//\"/\\\"};" for a in "$@" ; do x=$(printf '%q ' "$a") x="${x//\\/\\\\}" args[${#args[@]}]="${x//\"/\\\"}" done args+=('; cd ${bribriSaveDir}') mArgs=${args[@]:0} osascript <<EOF tell application "System Events" to set terminalRunning to exists process "iTerm2" if not terminalRunning then tell application "iTerm" activate repeat while the (count of the windows) = 0 delay 0.1 end repeat end tell end if set exec to "$mArgs" tell application "iTerm" set theWindows to {} repeat with i from 1 to the count of the windows if (is hotkey window of window i) = false and (is at shell prompt of current session of window i) = true then copy window i to the end of theWindows end if end repeat if (count of theWindows) = 0 then set newWindow to create window with default profile tell current session of newWindow to write text exec with newline else set currentWin to window 1 set currentDistance to 0 repeat with i from 1 to the count of theWindows set theWindow to item i of theWindows set bb to bounds of theWindow set x to (item 3 of bb) set y to (item 4 of bb) set dist to x * x + y * y if dist > currentDistance then set currentWin to theWindow set currentDistance to dist end if end repeat tell current session of currentWin to write text exec with newline end if end tell EOF The criteria for which window it selects can be adjusted by changing the interior of the repeat with i from 1 to the count of theWindows loop. Whichever window currentWin gets assigned to will be the one that Qt Creator runs the app in. I also got annoyed with the way that you have to press enter in the terminal window after the program I'm running in Qt Creator exits, since that doesn't really make sense to do if you're reusing the same terminal window over and over again. So I downloaded the source to Qt Creator and made a small modification to the qtcreator_process_stub tool it includes (which is the little executable that communicates with Qt Creator and manages running your app in a terminal window) so that it doesn't do that any longer, and it prints the return code of my program since I find it's useful to know precisely when it's terminated and how. Each time I update Qt Creator I just copy my version of qtcreator_process_stub into its application bundle to get the behavior I want. So far there hasn't been any changes to qtcreator_process_stub in several versions so it's been fine to just keep copying in my version of it. Here's a diff of the changes I made to it, at least for the unix / macOS side of things. I imagine it'd be easy to do something similar on Windows: --- a/src/libs/utils/process_stub_unix.c +++ b/src/libs/utils/process_stub_unix.c @@ -70,8 +70,8 @@ static volatile int chldPid; static void __attribute__((noreturn)) doExit(int code) { tcsetpgrp(0, getpid()); - puts(sleepMsg); - fgets(sleepMsg, 2, stdin); /* Minimal size to make it wait */ + //puts(sleepMsg); + //fgets(sleepMsg, 2, stdin); /* Minimal size to make it wait */ exit(code); } @@ -163,9 +163,11 @@ static void sigchldHandler(int sig) } } sendMsg("exit %d\n", WEXITSTATUS(chldStatus)); + printf("\nExited with status %d\n", chldStatus >> 8); doExit(0); } else { sendMsg("crash %d\n", WTERMSIG(chldStatus)); + printf("\nExited with status %d\n", chldStatus >> 8); doExit(0); } } @@ -180,7 +182,8 @@ int main(int argc, char *argv[]) char **env = 0; struct sockaddr_un sau; struct sigaction act; + printf("\n"); memset(&act, 0, sizeof(act)); if (argc < ArgEnv) { I figured I'd post all that stuff just in case someone else finds it useful. I definitely appreciate that Qt Creator is open source so I can make little modifications to it like this.
    • UNSOLVED Qt 5.6.0 app fails to launch with OSX 10.11 App Sandbox enabled - can't find cocoa plugin
      Installation and Deployment • os x qt 5.6.0 • • pavel_abr  

      3
      1
      Votes
      3
      Posts
      1609
      Views

      @pavel_abr Did you solve this? Please let me know the solution.
    • SOLVED I can't link to a third party framework on OS X
      General and Desktop • os x framework linker errors • • kenchan  

      3
      0
      Votes
      3
      Posts
      898
      Views

      @patrikd Thank your suggestion worked fine for my framework too. Wish I could give you a cartload of reps for that :-).
    • SOLVED Can't have application menu bar in english on OSX french
      General and Desktop • qml os x qt 5.5.1 menubar translations • • nelbok  

      12
      0
      Votes
      12
      Posts
      4022
      Views

      Hello, That not the problem here. If i understand correctly, the OSX Application Menu is translated by Qt, not my application. The problem occurs only with QtQuick and on a OSX no-english. So why i must do give a translated file created by me for QtQuick and not for QtWidgets ? (And not the translated files qt) Regards, nelbok
    • UNSOLVED QToolbar on OSX: no hover effect
      General and Desktop • desktop os x qtoolbar icon qaction • • Xanx  

      5
      0
      Votes
      5
      Posts
      1724
      Views

      Please have some patience, this forum is community driven and not all users live in the same timezone as you. The picture you are linking to doesn't show a hovered button but a checked button. You will have that visual effect if you set the checkable property of the action to corresponding to the button as true and you check it.
    • SOLVED Linker error with crt on OS X
      General and Desktop • os x linker errors qmake makefile • • Lukas Woodtli  

      4
      0
      Votes
      4
      Posts
      2031
      Views

      Thank you for the hint about 'solved'.
    • UNSOLVED Looking for help in porting Cocoa/ObjC/OSX app to Windows/C++/Qt
      Jobs • windows os x c++11 c++14 cocoa • • Didier Malenfant  

      10
      0
      Votes
      10
      Posts
      2665
      Views

      @DRivkin anyone interested can send an email to jobs@next.audio and I can take it from there.
    • UNSOLVED How to: Unified OS X Title Bars?
      General and Desktop • os x title bar • • Xandl  

      4
      0
      Votes
      4
      Posts
      2298
      Views

      Update: I managed to get a QWindow involved into the code, yet the toolbar is messed up. Screenshot New code: void Test::createFancyMacWindow() { QWindow* w = new QWindow(); NSView* mainWindowNSView = (NSView*) w->winId(); NSWindow* window = [mainWindowNSView window]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // move toolbar where the titlebar used to be [window setTitleVisibility: NSWindowTitleHidden]; // Adjust Cocoa layouts NSView *contentView = [window contentView]; [contentView setAutoresizesSubviews:YES]; QMacNativeWidget *nativeWidget = new QMacNativeWidget(contentView); //nativeWidget->move(0, 0); nativeWidget->setPalette(QPalette(Qt::red)); nativeWidget->setAutoFillBackground(true); NSView *nativeWidgetView = nativeWidget->nativeView(); [contentView addSubview:nativeWidgetView positioned:NSWindowAbove relativeTo:nil]; [nativeWidgetView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; [nativeWidgetView setAutoresizesSubviews:YES]; nativeWidget->show(); // Show the window. [window makeKeyAndOrderFront:window]; [pool release]; QMacToolBar *toolBar = new QMacToolBar(); toolBar->addItem(QIcon(), QStringLiteral("Helloooo")); toolBar->attachToWindow(w); [window setToolbar: toolBar->nativeToolbar()]; w->show(); }
    • UNSOLVED configure is ignoring me (OS X 10.11)
      General and Desktop • build os x • • Troff  

      1
      0
      Votes
      1
      Posts
      533
      Views

      No one has replied

    • UNSOLVED the new OS X full screen mode behaviour
      General and Desktop • os x fullscreen • • kenchan  

      1
      0
      Votes
      1
      Posts
      417
      Views

      No one has replied

    • SOLVED error in qglobal.h
      General and Desktop • os x • • clogwog  

      2
      0
      Votes
      2
      Posts
      2378
      Views

      nevermind, i saw someone had a different error but adding QMAKE_MAC_SDK = macosx10.11 in the pro file also fixes this.
    • UNSOLVED Qt on OSX cross compiler for PI
      Tools • raspberry pi os x cross platform • • DavidHux  

      20
      0
      Votes
      20
      Posts
      8271
      Views

      Core i5 is for sure x86_64 and it can execute i386 binaries as well. Because x86_64 was invented by AMD and later implemented by Intel as well it is often called AMD x86_64.
    • UNSOLVED Qt with glib support on Mac
      General and Desktop • os x glib qeventdispatche • • mcosta  

      4
      0
      Votes
      4
      Posts
      1271
      Views

      Sounds good :)
    • QGeoPositioning on OS X
      General and Desktop • os x positioning • • mcosta  

      4
      0
      Votes
      4
      Posts
      1005
      Views

      Then you can use that knowledge to add OS X to the backend list
    • QWidgetAction in Menu not showing on OS X
      General and Desktop • os x qwidgetaction • • cgarry  

      5
      0
      Votes
      5
      Posts
      1629
      Views

      Sorry, I've haven't given enough info: it's working on 10.8.5 with a Qt 5.6 build
    • [SOLVED]macdeployqt isn't adding all frameworks in .app file
      General and Desktop • error build mac os x macdeployqt framework • • Tusharh  

      3
      0
      Votes
      3
      Posts
      1060
      Views

      Thanks for the help. But the real reason was that, I was using wrong version of QT for my project. My project supports QT version upto 5.4 & I was using 5.5. After downgrading all works fine now.
    • Consistently getting TSMProcessRawKeyCode failed (-192) on installed application on OS X
      Installation and Deployment • mac deployment osx os x • • Hertzy  

      5
      0
      Votes
      5
      Posts
      1523
      Views

      The latest development is that I had over 254 files open at once. No wonder nobody else had encountered this.
    • [SOLVED]Where does WebEngineView save cookies on OS X and how do I keep it from saving cookies?
      QtWebEngine • os x webengineview login • • Hertzy  

      5
      0
      Votes
      5
      Posts
      3026
      Views

      Disregard my previous post, cookies policy can be set in the QWebEngineProfile owned by the QWebEnginePage owned by the QWebEngineView, like this: ui->webView->page()->profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies); The page pointer remains the same for my purposes, at least.
    • How to package OpenSSL libraries in an OS X package?
      Installation and Deployment • osx os x ssl https • • Hertzy  

      1
      0
      Votes
      1
      Posts
      1591
      Views

      No one has replied

    • WebView Content Size Problem
      QML and Qt Quick • qml qtquick qt 5.4 webview os x qt application qt5.4.1 • • bck25  

      3
      0
      Votes
      3
      Posts
      1849
      Views

      Thanks so much for taking a stab at it. I tried setting the experimental.preferredMinimumContentsWidth to numbers ranging from 1 to 10000, but it doesn't seem to have any sort of affect for me. I have tried playing around with experimental.page.scale. I found setting it to 1200/webview.width gives something similar to what I'm looking for. It prevents the page from shrinking when resizing. However, everything ends up getting very blurry, so it can't be a solution for me. I'll try digging through the experimental settings some more. It's too bad that it isn't better documented. It is so sad that this zooming "feature" can't be turned off. It looks like QWebView behaves properly by default, but it is a Qt widget, not a Qt Quick widget. So I won't be able to use it in my application. If anyone out there knows how to fix this, please help!
    • Qt5.5 macdeployqt trouble with multimedia
      Installation and Deployment • osx multimedia os x mac os x macdeployqt • • timday  

      4
      0
      Votes
      4
      Posts
      1926
      Views

      Issue created at QTBUG-47390
    • [SOLVED] Loading Shared Library in OS-X: dyld: Library not loaded: [...] Reason: no suitable image found.
      General and Desktop • os x shared library • • Frime  

      3
      0
      Votes
      3
      Posts
      4891
      Views

      Thanks a lot! This hint was expedient.
    • How to tell qmake copy third-party framework to DEST_DIR(.app/Contents/...) on OS X?
      General and Desktop • qmake os x framework build directory • • artemskikh  

      16
      0
      Votes
      16
      Posts
      4021
      Views

      Thank you, turned out it could be done like this: QMAKE_POST_LINK += $SCRIPT_PATH $ARG1 $ARG2 No need for system()
    • [SOLVED] Unable to run OSX code
      General and Desktop • os x program no output • • Duncan  

      5
      0
      Votes
      5
      Posts
      1391
      Views

      Thanks for the help all, Im a noob and realized im working in an IDE like Xcode that makes apps. I followed this tutorial for good info: https://www.youtube.com/watch?v=6KtOzh0StTc Thanks again!!
    • GLhandleARB type redefinition in OS X
      General and Desktop • opengl os x • • Leonardo Orazi  

      2
      0
      Votes
      2
      Posts
      1287
      Views

      Hi and welcome to devnet, I'd recommend taking a look at the bug report system to see if it's something known
    • [Mac OS] MySQL Driver not loaded but available
      Installation and Deployment • mysql qt 5.4 mac os x driver loaded not • • Dreaa  

      2
      0
      Votes
      2
      Posts
      978
      Views

      Hi and welcome to devnet, Did you install the MySQL client libraries on your OS X using e.g. macports or homebrew ?
    • Change scrollbar background color keeping OS X style
      General and Desktop • os x • • Cesius  

      2
      0
      Votes
      2
      Posts
      1253
      Views

      Hi, You can try to create your own style based on QMacStyle. Hope it helps
    • QFileDialog::getOpenFileName - dialog not closing on file select under OS X
      General and Desktop • os x dialog filedialog • • rwillard  

      9
      0
      Votes
      9
      Posts
      3285
      Views

      Can you try to comment the line OpenFile(filename); and use a qDebug there instead, this function could be the problem Thanks
    • Google's Protocol Buffers (protobuf) on OSX
      3rd Party Software • osx os x compile-errors protobuf • • Michael Sumulong  

      2
      0
      Votes
      2
      Posts
      2005
      Views

      Hi and welcome to the devnet, I use protobuf too (in Windows, Linux and OSX). In our OSX environment we build protobuf with $PROTOBUF_SRC_DIR/configure --silent --prefix=$PREFIX --disable-shared --enable-dependency-tracking=no
    • App Store can not close my Qt application
      General and Desktop • os x app-store • • fhdns  

      1
      0
      Votes
      1
      Posts
      373
      Views

      No one has replied

    • Leverage OS X Framework from Qt Application?
      General and Desktop • os x • • tkgg  

      3
      0
      Votes
      3
      Posts
      741
      Views

      Hi and welcome to devnet, As an example, you can take a look at the QtMacExtras module. The code there uses Objective-C++ to create interfaces to use OS X native frameworks.
    • [SOLVED] Do I have to care about these memory leaks ?
      General and Desktop • mac os x memory leaks instruments • • Moonlight-Angel  

      6
      0
      Votes
      6
      Posts
      1667
      Views

      Ok, thanks :).