AWS Thinkbox Discussion Forums

Qcompleter for Deadline TextControl

Hi,

I am using the deadline scripting that gets launched inside deadline monitor to make UI. Part of the functionality i wanted was to have a “TextControl” box have an autocomplete functionality like the Qcompleter for QLineEdit.

I saw an example on the forum where I am able to create my own customQtDialog, but that would mean I have to rewrite my entire UI using QT instead of the DeadlineScriptDialog. Is there another option I haven’t explored yet?

Thanks!

I think you can just use addWidget() to add either type of control. Looking at the documentation for AddControl() in our API it doesn’t seem like we can insert just anything there, but might be worth a try. Just throw a QButton or something its way.

I think I’ve posted this example before, but this is my weird amalgum in a tool I wrote once:

    scriptDialog = DeadlineScriptDialog()
    scriptDialog.SetSize(1024, 768)
    scriptDialog.SetTitle("Some Kinda Title")
   
    layout = scriptDialog.layout()
    
    report_view = LineNumberTextEdit()
    report_view.setReadOnly(True)
    report_view.setWordWrapMode(QTextOption.NoWrap)

    button = QPushButton("Boop")
    
    report_results = QListWidget()
    fixed_font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
    report_results.setFont(fixed_font)

    ...
    
    layout.addWidget(report_results, stretch = 1)
    layout.addWidget(report_view, stretch = 3)
    layout.addWidget(button, stretch = 1)
    
    scriptDialog.ShowDialog(True)
Privacy | Site terms | Cookie preferences