WSLg QtCreator broken menus and no autocompletion - qt-creator

I'm using WSlg with Ubuntu 18.04 on windows 11 and I've installed on it the Qt Creator IDE. Via the WSLg I can easily launch it through the start menu of windows 11.
The issue is that while coding with it I have no autocompletion (ctrl + space shows no menu). Also the right click menu after a while goes nuts and start showing in weird places of the screen until it disappears completely; same for the menus on the top bar.
I attach a picture where I show how the right click menu shows up out of the boundaries.
Anyone encountered this issue and has a solution?

So for now I have found a workaround even if it's not a proper solution.
I was using QtCreator installed via the online installer that Qt Provides. I tried using the version that comes with apt-get and I do not have those issues. Also the windowing is different because is showing the usual gray boxing of the WSLg apps; so might be related to the XWayland server architecture or something similar.
Cons of this are that the QtCreator version that comes this way is not up to date with the latest and will rely on the qt libs you have installed on your wsl (being ubuntu 18 will be qt5 and not qt6, meaning you'll not have QtCreator 8).
Also right not I'm having issue on the ClangCodeModel but I think it's a different issue.

Related

QT QSystemTrayIcon on mac is squashed in the second screen

I create a system tray icon on MacBook. And I connect a screen with Mac. When I run this program,the system tran icon on the monitor is squashed.
QSystemTrayIcon *m_tTrayIcon = new QSystemTrayIcon(this);
m_tTrayIcon->setIcon(QIcon(QPixmap("/Users/xxx/Downloads/pic.png")));
m_tTrayIcon->show();
when the monitor is not focused, the icon is squashed.
and when I click the desktop of the monitor, the monitor is focused, the icon is also become normal.
This is a known bug in Qt with new verisons of MacOS. Check out this bugreport.
Solution would be either use fixed versions (they claim to fix it in 5.12.11 and 6.1.0) or compile cocoa plugin by your own and ship it with your application instead of one provided by Qt.
Fix is just a one line of code that you need to apply. The easiest way is:
download qtbase (for example from github) and checkout version you need
In case you will use Qt < 6.0.0 (i.e. building with qmake rather than with CMake) - copy .qmake.conf from root to qtbase/src/plugins/platforms/
you go to qtbase/src/plugins/platforms/cocoa and open cocoa.pro or CMakeLists.txt (depends on what version of Qt you have checked out)
you apply patch and compile the plugin
From now on you should use cocoa plugin you have just compiled instead of one shipped with Qt (either replace it in Qt installation or every time you deploy your application)

Mac OS Siera PyQt5 QTabWidget Issue

I usually program on windows (at work) or linux (free time).
Now im doing a project for my wife, and she uses a mac.
In this project there is a QTabWidget with closeable tabs.
On windows the close icon appears properly, and as excepted, however on MAC there is no close icon.
When you click far left on the tab title it just closes unexpectedly, because you cant see a close icon, and im not 100% sure why that is.
Anyone seen this before and know of a fix?
Mac is latest Siera os (just updated)
Python 3
PyQt5 (installed with pip3)
Thanks very much in advance
This is caused by a bug which has been fixed in Qt-5.9.2 (see QTBUG-61092).
In the meantime, it should be possible to work around the issue by setting your own icon using a stylesheet. To do this, you would need to use the QTabBar::close-button selector, which is documented in the Qt Style Sheets Reference.

Distance lines are not showing in interface editor

after installing latest Mac OS X (El Capitan) I found that distance lines inside Xcode interface editor does not appear anymore after pressing alt key. I do not know if system update has something to do with it ... maybe I just pressed some kind of key configuration which disabled distance guides. Did someone ever had similar situation? Below I attached link to image which exactly shows lines I am talking about.
https://www.dropbox.com/s/qoy8wvvddxxaupy/2015-10-06_1341.png?dl=0
Ok so It turned out that the problem was in having two Xcode versions installed on one machine. I mean that currently I have Xcode 6.4 and 7.1 on my mac and version 6.4 behaves sometimes quite strange (for example I am not able to add new source file directly to project because I am not able to choose any group option). 7.1 is ok. So if you have some problems in similar configuration then get rid of Xcode 6.

JavaFX programs show only graphical nonsense under Java 8

I have installed Scene Builder 2.0 on my Mac. When started (whether as standalone program or from within e(fx)clipse) it shows only a graphical mess (a fragmented mixture of my desktop wallpaper and program windows which have been on the screen recently). The menu bar works, but if I e.g. open the "about Scene Builder" window this window also contains that graphical nonsense. In rare occasions, the start screen looks somehow as it should but all characters are messed up with strange characters and after moving the window I get the same graphical mess as always.
I tried running the JavaFX programs from the JavaFX 2.2 demo bundle and found the same problems. They also have worked before I installed Java 8.
Even JavaFX programs run frum within eclipse show the same behaviour.
I'm running Mac OS X 10.7.5 with all recent updates, Java 8 Update 25 and Scene Builder 2.0 on a 13" MacBook from 2008.
Previously, I had no problems with Scene Builder 1.x and Java 7 on this system (maybe I got OS updates in between).
I have tried reboots, reloaded Scene Builder from the website and reinstalled it, removed all old versions of Java. Nothing did work. The OS X software updater tells me everything is up to date.
Any Suggestions?
Anyone with similiar problems?

Unable to build using Xcode 4 - The selected run destination is not valid for this action

So I'm horribly confused by this error, other threads on Stack Overflow mention I should set the SDK, but I see no option to do this. I'm trying to build:http://wafflesoftware.net/shortcut/
And I get no options, and I can only choose My Mac 64-bit, and I want it in 32-bit. Really beginning to hate Xcode 4.
Here is the screenshot when I try to edit my scheme: http://groovyape.com/scheme.png
Thoughts?
Firstly, I have observed that when Xcode 4 decides my Mac is 64 bit and all my other schemes have vanished, a restart of Xcode fixes that.
If you still have the issue after a restart, go to Manage Schemes... (under the Product Menu) and click on Autocreate Schemes now button. Try to delete the other schemes and see if you can run the project now.
However, if the issue is that you need to set the SDK, that's different:
Click on the top-level project icon in the left hand panel
In the right hand panel that appears, select Build Settings (near the top).
Select "All" option (instead of Combined)
Ensure Base SDK is set appropriately, like "OS X 10.7".
FWIW I'm seriously considering reverting to Xcode 3.2.5 at the moment, 4 seems horrendously buggy.
In xCode 4.4.1, use Validate Settings to solve the problem!
I can select either 32bit or 64bit now.
Ran into the same error message ("The selected run destination is not valid for this action") when attempting to use XCode 4 to build/run a tiny Objective-C "Hello, World" project I created in XCode 3.x. Fixed it by choosing to "Manage Schemes..." from the drop-down menu to the right of the Stop button, deleting the one scheme on the list (click checkbox beside the scheme, then click the "-" button at the bottom left), and then clicking "Autocreate Schemes Now".
I also needed to change the "Base SDK" from 10.5 to 10.6, by clicking on 'folder' icon (beneath the Run button), clicking the root/top of the tree view below it, clicking on the blue icon below "PROJECT" in the pane just to the right, and then finally, choosing "Latest Mac OS X (Mac OS X 10.6)" to the right of that.
I had this issue today. I found switching Base SDK from Latest iOS (4.3) to iOS 4.3 fixed everything.
This will happen if XCode believes your mac is a 64-bit machine, when really it's a 32-bit. If this is the case for you, simply click on your project icon from the far-left pane - it's the menu item that displays your project name next to a little blue icon. This should bring up a center pane that says "PROJECT" at the top. Highlight your project name, and the third pane should now show your build settings. The first item is "Architectures" which will allow you to specify if you are building a 32-bit or 64-bit application.
Kind of amazing that none of the answers here solved the issue for me, but I figured it out. Forget restarting Xcode, or using Autocreate Schemes, still only 64-bit will show up as a valid destination in the scheme.
The correct solution is to change the Architecture for your project. Go to Build Settings (in the root node of your project), and change Architecture to 32-bit Intel, it's right above the Base SDK setting. Destination will instantly switch to "My Mac 32-bit". HTH somebody.
It sounds as if you're trying to run (Cmd-R or run button) the framework (which you can't do - it's not an executable, just a library) rather than simply build it (Cmd-B).
I had this issue and maybe it was a coincidence but when I restarted XC4 but this time didn't choose to load my project from the popup window that appears on launch - instead choosing it explicitly from the File menu - the issue didn't occur and the build started ok.
On the 3 or 4 occasions I had this error, I had chosen to load the project from the popup window that appears when XC4 first loads.
As I say, I might have just got lucky, but I certainly didn't make any other changes to the projects to 'fix' the issue.
I found a good practice for moving from Xcode 3.2.X to Xcode 4 is, to remove any references to older SDKs (in the case of Mac OS to remove any Base SDK Ref, etc., for Mac OS <= 10.5, in the case of iOS I think you need to remove everything <= 4.3) PRIOR to upgrading to Xcode 4.
I never experienced any problems for new Projects, created in Xcode 4, only for such that where created with Xcode 3.X or 2.X
Xcode 4.5. I was trying to compile for 10.6. It seemed to be stuck on 64 bit just because it couldn't find the sdk. I didn't get any message about it not finding the sdk.
I first tried to put in the correct path to /Developer-3.2.6/SDKs/MacOSX10.6.sdk but xcode didn't want to find it there. Then I copied that folder into 4.5 next to the other OSX Platform sdk (new location I think just look in the bundle).
And magically my 32 bit came back.
So my conclusion is that the 32/64 bit option is really dependent on whether xcode can verify the sdk that you're trying to use. Being stuck at 64 while trying to compile for 32 gives the error without notifying you that its first issue is that the sdk can't be found.
I fixed this by deleting my xcuserdata in my Project file. Not sure how it got corrupt. But it worked for everyone else in the office, deleting the xcuserdata did the trick. I made sure Xcode was closed while doing so. Just for fun, make sure you delete your DerivedData folder for the app, and do a build clean for superstitious folks.
If this happened after you renamed your app, go to Schemes -> Edit Scheme -> Run <YourApp> -> Info
Select the right executable file (YourApp.app)
Another way is to select None as executable and then reselect the YourApp.app from your Debug-iPhoneOS folder.

Resources