Skip to content

dasbluehole/Qt-to-HTML

Repository files navigation

Qt-to-HTML

Qt designer UI file to HTML form generator.

Designig HTML forms for non web developers is a PIA.

  • I used QtCreator for few of my projects and Glade too. But never Web Technology. For my other project "Scarlet" i needed some forms to test. i know how much difficult it was to make a HTML file.

  • secondly Using existing tools to code for new project is always a good practice. Hence if some one is porting some Qt code to Web Technology then this may help.

What it is

This is simply a .ui xml file to HTML file converter. It reads a Qt .ui file created by Qt-Creator or Designer, then it translate the XML to corresponding HTML form elements.

Implemented

Currently it can handle following Qt Widgets.

  • QLabel
  • QLineEdit
  • QPushButton
  • QCheckBox
  • QRadioButton
  • QComboBox
  • QPlainTextEdit
  • QTextEdit
  • QTextBrowser
  • QTableWidget
  • QDateEdit
  • QTimeEdit

And

  • QMainWindow
  • QDialog
  • QWidget

as main containers. It doesn't support layouts currently but may support in some (unseen)future time. Implementing all the widgets may not be possible but gradually what ever widgets are possible will be implemented.

Currently if there is a signal-slot connection available it generates a place holder function in script area of the generated HTML file.

For any QPushButton, a on_pushButton_clicked() onclick arttribute is generated.

User should edit and modify the scripts as per requirement.

Output

Currently implemented Features HTML Equivalent Qt Dialog HTML equivalent Qt Widget Html Equivalent Qt MainWindow Html mainwindow

Example

See the example files in example folder.

Try out yourself with simple .ui files and enjoy.