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. Using C++ to create Interface Panel with just UI file (QT)
Forum Updated to NodeBB v4.3 + New Features

Using C++ to create Interface Panel with just UI file (QT)

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 2.3k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    citi
    wrote on 17 Jul 2013, 11:26 last edited by
    #1

    I have a UI file and want to create an Interface by Qt. I think having a UI file is enough to create a Interface Panel. and I want to do this job by a software programme which is created by myself, without open Qt. I want to do this work by a C++.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 17 Jul 2013, 11:39 last edited by
      #2

      I don't understand you. Can you rephrase your question?

      So you have an UI file, but you don't want to use it and write the GUI yourself, by hand, only in C++? It is possible, although not flexible and gives no real benefits apart from - maybe - a few miliseconds during compilation.

      (Z(:^

      1 Reply Last reply
      0
      • C Offline
        C Offline
        citi
        wrote on 17 Jul 2013, 11:48 last edited by
        #3

        I need to create UI myself, with some of the rules. I can create the UI myself now. But I need help to use the UI with QT creator and build it. (When I put my own UI in Qt current dırectory, it works well with my UI, but at this one I compile programme with QT creator) But I need to do this work with a software (which is c++). when i start that software programmhe, the programme bring my own UI and compile it same as Qt creator then open the Interface panel automaticly.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          citi
          wrote on 17 Jul 2013, 13:47 last edited by
          #4

          For example my UI is :

          <?xml version="1.0" encoding="UTF-8"?>
          <ui version="4.0">
          <class>QtTabClass</class>
          <widget class="QMainWindow" name="QtTabClass">
          <property name="geometry">
          <rect>
          <x>0</x>
          <y>0</y>
          <width>600</width>
          <height>400</height>
          </rect>
          </property>
          <property name="windowTitle">
          <string>QtTab</string>
          </property>
          <widget class="QWidget" name="centralWidget">
          <widget class="QPushButton" name="pushButton">
          <property name="geometry">
          <rect>
          <x>100</x>
          <y>150</y>
          <width>75</width>
          <height>23</height>
          </rect>
          </property>
          <property name="text">
          <string>PushButton</string>
          </property>
          </widget>
          </widget>
          <widget class="QMenuBar" name="menuBar">
          <property name="geometry">
          <rect>
          <x>0</x>
          <y>0</y>
          <width>600</width>
          <height>21</height>
          </rect>
          </property>
          </widget>
          <widget class="QToolBar" name="mainToolBar">
          <attribute name="toolBarArea">
          <enum>TopToolBarArea</enum>
          </attribute>
          <attribute name="toolBarBreak">
          <bool>false</bool>
          </attribute>
          </widget>
          <widget class="QStatusBar" name="statusBar"/>
          </widget>
          <layoutdefault spacing="6" margin="11"/>
          <resources>
          <include location="qttab.qrc"/>
          </resources>
          <connections/>
          </ui>

          1 Reply Last reply
          0
          • C Offline
            C Offline
            citi
            wrote on 17 Jul 2013, 13:54 last edited by
            #5

            @<?xml version="1.0" encoding="UTF-8"?>
            <ui version="4.0">
            <class>QtTabClass</class>
            <widget class="QMainWindow" name="QtTabClass">
            <property name="geometry">
            <rect>
            <x>0</x>
            <y>0</y>
            <width>600</width>
            <height>400</height>
            </rect>
            </property>
            <property name="windowTitle">
            <string>QtTab</string>
            </property>
            <widget class="QWidget" name="centralWidget">
            <widget class="QPushButton" name="pushButton">
            <property name="geometry">
            <rect>
            <x>100</x>
            <y>150</y>
            <width>75</width>
            <height>23</height>
            </rect>
            </property>
            <property name="text">
            <string>PushButton</string>
            </property>
            </widget>
            </widget>
            <widget class="QMenuBar" name="menuBar">
            <property name="geometry">
            <rect>
            <x>0</x>
            <y>0</y>
            <width>600</width>
            <height>21</height>
            </rect>
            </property>
            </widget>
            <widget class="QToolBar" name="mainToolBar">
            <attribute name="toolBarArea">
            <enum>TopToolBarArea</enum>
            </attribute>
            <attribute name="toolBarBreak">
            <bool>false</bool>
            </attribute>
            </widget>
            <widget class="QStatusBar" name="statusBar"/>
            </widget>
            <layoutdefault spacing="6" margin="11"/>
            <resources>
            <include location="qttab.qrc"/>
            </resources>
            <connections/>
            </ui>@

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 17 Jul 2013, 14:19 last edited by
              #6

              Hi,

              It's not very clear from your description but are you searching something like "QUiLoader":http://qt-project.org/doc/qt-4.8/quiloader.html ?

              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
              • C Offline
                C Offline
                citi
                wrote on 17 Jul 2013, 14:32 last edited by
                #7

                I also need to find how can i open qt directly by code. And then the code can open QuiLoader, or others....

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sierdzio
                  Moderators
                  wrote on 18 Jul 2013, 12:30 last edited by
                  #8

                  I still have no idea what you mean. Please, get a book on Qt, read it, maybe this will clear things up for you.

                  Please learn better English, too, as it's very hard to understand you now.

                  I don't mean to be rude, mind you: I want to help you, but right now I simply don't know what you are talking about.

                  (Z(:^

                  1 Reply Last reply
                  0

                  1/8

                  17 Jul 2013, 11:26

                  • Login

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