Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Calling dialog window from main window
Forum Updated to NodeBB v4.3 + New Features

Calling dialog window from main window

Scheduled Pinned Locked Moved Unsolved Qt for Python
1 Posts 1 Posters 665 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sequence
    wrote on 16 Jan 2019, 01:46 last edited by sequence
    #1

    I used Qt5 Designer to create a MainWindow object. One of the menu items calls a dialog window, so I created another (dialog) window in Qt5 Designer, which had to be saved to a separate .ui file. I could not find in Qt5 Designer how to set up an action invoking this dialog window from the main window, so I'm trying to code this by hand. Then I used pyuic5 to convert the Designer code to Python code. Both Python files have two methods:
    setupUi and retranslateUi . Here's how I'm trying to invoke this dialog in the file containing the MainWindow :

    self.actionE_mail.triggered.connect()
    -or-
    self.actionE_mail.triggered.connect(addemail.Ui_addEmail.retranslateUi)
    

    But I'm getting the following error:

    python3 main.py
    TypeError: retranslateUi() missing 1 required positional argument: 'addEmail'
    Abort trap: 6
    

    Can someone please help me with this? Also, I would appreciate if someone could tell if there is a way in Qt Designer to set up events like this.

    1 Reply Last reply
    0

    1/1

    16 Jan 2019, 01:46

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved