Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [QT4] Variables in .ui file
QtWS25 Last Chance

[QT4] Variables in .ui file

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 874 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.
  • P Offline
    P Offline
    Paddre
    wrote on last edited by
    #1

    Hi there,

    my current task at work is to port a quite complex program (with over 40 classes) from Qt 3 to Qt 4.
    The project contains several QDialogs, which have been created using Qt Creator.

    To explain my question easier, I take a QDialog as an example (let's call it dialog ;-) ).
    dialog.ui (Qt3) contains several <variable> tags (<variable access="public">int temp;</variable>).
    UIC builds the file dialog.h which contains these variables as public members of class dialog.

    Afaik these <variable> tags are no longer supported in Qt 4.

    Since there are many classes which use these public members, I wonder if there is a possibility to get them into the Qt4 - dialog.ui so that UIC declares them in ui_dialog.h.
    The only alternative I can imagine is to implement a class that inherits Ui_dialog and declares the missing members. But I want to avoid this way

    Do you have an idea how I can solve it?

    Regards
    Patrick

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You can find "here":http://qt-project.org/doc/qt-4.8/porting4-designer.html a guide to post Qt 3 UI files to Qt 4.

      You might also want to consider going with Qt 5 directly

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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