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. QtCreator - some basics questions...
QtWS25 Last Chance

QtCreator - some basics questions...

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtcreatorqtdesignqtdesigner
4 Posts 2 Posters 756 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 30 Jun 2020, 10:52 last edited by
    #1

    Hey

    So I never picked the qt creator/designer workflow. Always somehow did stuff myself and now I got curious so I'm learning the thing...

    I'm in CMake mode...

    Some thing I'd like to ask for...

    1. Say in creator I click Add New > Qt > Qt Designer Form > next/next Ok. Now it creates the .ui file, but does not add it to project, is that correct? I have to hand add it ? I have configured to add it to project, but nothing gerts added to cmake/cant see file... Is that normal? Do I hand add it?
    2. Same as above but lets add Qt Design Form class Same issue as above, I get new files but nothing added to project?
    3. How can I convert a item I made in point 2 from QDialog to lets say QMainWindow, or QScrollBar or QWidget? I keep clicking around in Design but nothing happens... Any hints?

    I think I'll come with more hiccups as I delve in, but for now, any ideas? :- )

    TIA!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 30 Jun 2020, 19:53 last edited by
      #2

      Hi
      Not a cmake fan so never used it with Qt. But as far as i know, you have manually add new files.
      There is
      https://cmake.org/cmake/help/v3.14/prop_tgt/AUTOUIC.html
      that should be used to process the ui files.

      This is just what i have understood reading on forum. Sadly i dont know the full details.

      1 Reply Last reply
      1
      • D Offline
        D Offline
        Dariusz
        wrote on 3 Jul 2020, 16:17 last edited by
        #3

        @mrjj said in QtCreator - some basics questions...:

        Hi
        Not a cmake fan so never used it with Qt. But as far as i know, you have manually add new files.
        There is
        https://cmake.org/cmake/help/v3.14/prop_tgt/AUTOUIC.html
        that should be used to process the ui files.

        This is just what i have understood reading on forum. Sadly i dont know the full details.

        Hey

        Thanks, yeah I'm adding files by hand for now.

        In any case do you know maybe how to change initial type of file from QWidget to QDialog/etc/etc?

        TIA

        M 1 Reply Last reply 3 Jul 2020, 19:56
        0
        • D Dariusz
          3 Jul 2020, 16:17

          @mrjj said in QtCreator - some basics questions...:

          Hi
          Not a cmake fan so never used it with Qt. But as far as i know, you have manually add new files.
          There is
          https://cmake.org/cmake/help/v3.14/prop_tgt/AUTOUIC.html
          that should be used to process the ui files.

          This is just what i have understood reading on forum. Sadly i dont know the full details.

          Hey

          Thanks, yeah I'm adding files by hand for now.

          In any case do you know maybe how to change initial type of file from QWidget to QDialog/etc/etc?

          TIA

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 3 Jul 2020, 19:56 last edited by
          #4

          @Dariusz said in QtCreator - some basics questions...:

          maybe how to change initial type of file from QWidget to QDialog/etc/etc?

          If you mean how to change the .h, cpp and UI file to be other type ?

          You will have to change in 3 places

          .h

          class MainWindow : public QMainWindow <<< change here

          .cpp
          MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent) <<<< change here to new type

          .ui
          This you have to do outside creator, and its best if you close it.
          Open the ui file in other editor. ( its text)
          alt text

          1 Reply Last reply
          0

          4/4

          3 Jul 2020, 19:56

          • Login

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