dialog box will not show

Need help, or want to share a macro? Post here!
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: dialog box will not show

Postby vocx » Mon Sep 16, 2019 11:30 pm

mfasano wrote:
Mon Sep 16, 2019 11:24 pm
I thought I would try reinstalling FreeCad.

Qt version: 5.6.2
Where are you getting this program from? As I said, your Qt version is old. If I'm not mistaken, the Qt version packed with Windows is Qt 5.12. Look at mario's post.

Code: Select all

Traceback (most recent call last):
  File "C:/Users/Matt/AppData/Roaming/FreeCAD/dialogtest.FCMacro", line 26, in <module>
    from pyside2 import QtCore, QtGui, QtWidgets
<class 'ModuleNotFoundError'>: No module named 'pyside2'
The module to import is called PySide2, not pyside2.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
mfasano
Posts: 88
Joined: Wed Apr 11, 2018 12:31 pm

Re: dialog box will not show

Postby mfasano » Wed Sep 18, 2019 12:49 am

It works now. I did not have parentheses after __init__()

Code: Select all

class init_val_prob_dialog(QtWidgets.QDialog, Ui_init_val_prob_dialog):
    def __init__(self):
        super(init_val_prob_dialog, self).__init__()
        self.setupUi(self)
        self.show()
Thank you very much vocx.
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: dialog box will not show

Postby vocx » Wed Sep 18, 2019 1:14 am

mfasano wrote:
Wed Sep 18, 2019 12:49 am
It works now. I did not have parentheses after __init__()
WHAT?!@#!@#!@#!

Cmon, man. I told you about this.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.