two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by onekk »

bambuko wrote: Mon Mar 20, 2023 5:04 pm ...
unless,,, Qt shares the same directory?
...
I don't know for sure, but, when using different Qt apps, I can't get an uniform behaviour, i.e I use mainly FreeCAD so the file I've mentioned in my preceding post is populated with those settings, but if I use another Qt apps, I note a mixing between settings of the two "FileDialog" windows.

So I suppose that there is a system setting file somewhere, the only candidate I've found is the above file, but maybe making some research with Qt in the name In your user directory should gave some other results, I suppose it is a "per user" setting so not a "system wide" setting in "proper sense", but I'm not a Qt expert, I only use the Qt webpages when I try to program something, but these informations are not easy to find in "general documentation".

Sad to not be of more help.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by bambuko »

you are helping indeed ;)
even if by stimulating grey (fading in old age) cells :lol:

I have deleted .config for the master FreeCAD appimage
and restored backup version from safe time
and started again

set everything up and re-started FreeCAD (master branch appimage)
at first got the message:

Code: Select all

couldn't set up display table
and one of the panels gone haywire after restart

so I closed that panel and re-done it, paying attention that it is not floating somewhere in space on second monitor
(i.e. it is anchored to screen edges) and all seems fine now...

I am hoping that this is the end of this sorry saga ;) and I can go back to using FreeCAD rather than ffafing around with it :roll: :lol:
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by adrianinsaval »

Like I said qt does not differentiate between master and link and uses the same config files, this info is saved by qt not by freecad so it doesn't matter that link uses ~/.FreeCAD and master uses ~/.config/FreeCAD, setting FREECAD_USER_HOME also shouldn't have an effect as those are for freecad specific config and data files.
onekk wrote: Mon Mar 20, 2023 4:57 pm I have no KDE so in my case is at:
~/.config/QtProject.conf
these are likely general qt settings, the window positions for freecad (both link and master) should be stored at ~/.local/FreeCAD/FreeCAD.conf
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by bambuko »

adrianinsaval wrote: Mon Mar 20, 2023 5:26 pm Like I said qt does not differentiate between master and link ...
I don't know enough to question :)
but... if it doesn't differentiate, why is the screen setup different between master and link?

Wouldn't setting it up in one (say for example link branch)
be reflected (without any need of me doing anything) when I fire master branch?

MASTER /home/bambuko/.local/share/FreeCAD
LINK /home/bambuko/.FreeCAD
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by onekk »

bambuko wrote: Mon Mar 20, 2023 5:33 pm I don't know enough to question :)
but... if it doesn't differentiate, why is the screen setup different between master and link?

Wouldn't setting it up in one (say for example link branch)
be reflected (without any need of me doing anything) when I fire master branch?

MASTER /home/bambuko/.local/share/FreeCAD
LINK /home/bambuko/.FreeCAD
Yes because Link uses the old way to specify things, that has changed in 0.20 something to follow the XDG schema directory, so probably:

Code: Select all

/home/bambuko/.local/share/FreeCAD
is the "new schema" i.e the new default location

Link Branch has not (yet) followed new way and is using the "old schema" using the "hidden" .FreeCAD directory.

Using launch scripts will differentiate between versions, but sadly Qt default settings, if involved are not affected, however, using AppImages probably Qt versions could be different, as I think that AppImage is supplying "his own" Qt version (I could be wrong, let's see if some experts have more in deep knowledge). For what I don't know if there is some way to tell Qt maybe with a environment variable what config file to use and differentiate between versions.

The behaviour I have see is QtFileDialog width and recent file list, and probably last chosen default extension, so minor things, but as the file is conceived like an "old windows ini file" it could contain much more.

Using some logic windows position of an Application (Software, Program, call it as you want as time has changed some definition, now many people are using Apllication) should be keep by the application itself, so in its configuration directory, but with multi monitor setting I don't know, what I don't know and maybe this could matter is if there is some FreeDesktop standard that will affect things, so if other configuration files are involved.

What is almost sure is that link branch is behind some thousand of commits in respect to master, so some aspect are diverging, one of them is the "default user config path".

What is worsening things, is that "master" is searching for "old positions" to retain compatibility, while LINK is not aware of the "new schema" (if RT has not implemented recently this thing.)

I wonder if there is some work about multimonitor settings on master and who is the developers that know this sort of things, it will be interesting to have some authoritative answer.

My knowledge is not much more than I have shared in this and preceding posts.

Kind Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by adrianinsaval »

the behavior is odd, for me after using the realthunder branch some panels from regular freecad are in different positions and some are unaffected, same thing the other way around.
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by bambuko »

adrianinsaval wrote: Wed Mar 22, 2023 1:15 am the behavior is odd...
yes, indeed
I have two machines"

- one is running only snaps of master and link - this one is rock steady with no two monitor issues at all.

- second machine runs only appimages of master and link - like yourself, master ends with window panels in random positions or simple/eventually returning back to single monitor display (as @hko mentioned in his post)

appimage thing could be simply association rather than cause - appimages are generally older than snaps that are bleeding edge and continually updated
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by adrianinsaval »

Snaps have fully isolated config locations for each program, including Qt config, appimages just use the standard locations. That's why appimages interfere with each other but snaps don't.
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by bambuko »

adrianinsaval wrote: Wed Mar 22, 2023 10:21 am ...That's why appimages interfere with each other but snaps don't.
thank you!
yes, of course snapbox and sandboxes :P

The only thing that confuses me is this - why is it the master(appimage) that gets interfered with and corrupted, but not the other way round?
i.e. link(appimage) remains fine
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: two monitors-(QMainWindowLayout::tabPosition called with out-of-bounds value '0')

Post by adrianinsaval »

This is pure guessing but I think link branch stores the panel positions as parameters in FreeCAD config (but this doesn't stop Qt from storing that info) while master doesn't and just relies on Qt for this.
Post Reply