Search found 50 matches

Go to advanced search

by Chri1
Fri May 17, 2019 9:09 am
Forum: Python scripting and macros
Topic: QT-Dialog convert to python
Replies: 7
Views: 541

Re: QT-Dialog convert to python

Additional.
After some try and error I added this Code:

Code: Select all

class doit():
   def __init__(self):
       self.d = QQtGui.QMainWindow() 
       self.d.ui = bkneu.Ui_Dialog()
       self.d.ui.setupUi(self.d)
       self.d.show()
And now it works also with: bkneu.doit()

Chr1
by Chri1
Mon May 13, 2019 3:27 pm
Forum: Forum in Deutsch
Topic: Benutzerabfrage Punkt
Replies: 9
Views: 472

Re: Benutzerabfrage Punkt

Hi

Im "Python scripting and macros" bin ich der Sache auf die Spur gekommen:

Code: Select all

https://forum.freecadweb.org/viewtopic.php?f=22&t=36270&p=307863#p307863
LG
Chri1
by Chri1
Mon May 13, 2019 10:54 am
Forum: Python scripting and macros
Topic: Interrupt macro for userinput point
Replies: 3
Views: 184

Re: Interrupt macro for userinput point

Thanks A first attempt worked out: I typed in Phyton-Console: import DraftSnap def cb(point): if point: print (point) and with every FreeCADGui.Snapper.getPoint(callback=cb) I get the the snapped point of an existing object (Depending on the current snap-settings) There seem to be a lot more options...
by Chri1
Fri May 10, 2019 3:04 pm
Forum: Forum in Deutsch
Topic: QT-Dialog, uic.py fehlt
Replies: 1
Views: 164

Re: QT-Dialog, uic.py fehlt

Habe eine Lösung gefunden:
Siehe Forum "Python scripting and macros"
https://forum.freecadweb.org/viewtopic. ... 81#p306922

LG
Chri1
by Chri1
Fri May 10, 2019 2:53 pm
Forum: Python scripting and macros
Topic: Interrupt macro for userinput point
Replies: 3
Views: 184

Interrupt macro for userinput point

Hi

I want a macro / dialog be interrupted to allow the user to specify a point by pointing with the mouse.
I know "Observing mouse events in the 3D viewer via Python" but I want the snaps of existing objects to be caught.

(In AutoCAD/Lisp it would be getpoint)

Thanks for help

Chri1
by Chri1
Thu May 09, 2019 2:16 pm
Forum: Python scripting and macros
Topic: QT-Dialog convert to python
Replies: 7
Views: 541

Re: QT-Dialog convert to python

Hi It works! # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'bkneu.ui' # # Created by: PyQt5 UI code generator 5.12.1 # # WARNING! All changes made in this file will be lost! import PySide from PySide import QtGui ,QtCore from PySide.QtGui import * from PySide.QtCore im...
by Chri1
Mon May 06, 2019 6:41 pm
Forum: Python scripting and macros
Topic: QT-Dialog convert to python
Replies: 7
Views: 541

Re: QT-Dialog convert to python

Hi Hi Tried many versions of phython, but finaly it worked like this – thanks Mario: I installed Python: https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe and from cmd: pip3 install PyQt5-sip pip3 install PyQt5 then Cpyuic5.exe bkneu.ui bkneu.py worked and I mad a .bat: @" C:\Users\...\...
by Chri1
Sun Apr 28, 2019 4:25 pm
Forum: Python scripting and macros
Topic: QT-Dialog convert to python
Replies: 7
Views: 541

QT-Dialog convert to python

Hello I made a dialog in QT-Creator and tried to convert it for Win7 like in www.freecadweb.org/wiki/Dialog_creation : "@C:\Python27\python" "C:\Python27\Lib\site-packages\PySide\scripts\uic.py" %1.ui > %1.py" But on the whole PC I cannot find uic.py and also no folder Python27 (QT is installed and ...
by Chri1
Fri Apr 26, 2019 12:05 pm
Forum: Forum in Deutsch
Topic: QT-Dialog, uic.py fehlt
Replies: 1
Views: 164

QT-Dialog, uic.py fehlt

Hi
Habe lt. den Anleitungen einen QT-Dialog und compSide.bat zum Umwandeln erstellt.
Nur: uic.py gibt es nirgends auf meinem PC (Win7)

LG
Chri1
by Chri1
Fri Apr 12, 2019 1:04 pm
Forum: Forum in Deutsch
Topic: Benutzerabfrage Punkt
Replies: 9
Views: 472

Re: Benutzerabfrage Punkt

Ok, das mit dem Observer funktioniert, liefert aber nicht die Koordinaten im Raum sondern die 2D-Bildschirmkoordinaten. Nun brauche ich aber die Weltkoordinaten -> Habe das Ganze noch ergänzt mit posw = self.view.getPoint(pos) Wenn es eine Draufsicht ist, stimmen wenigstens die x und y Koordinaten u...

Go to advanced search