Results 1 to 4 of 4

Thread: Switching between .ui and .h/.cpp (and help)

  1. #1
    Join Date
    Aug 2011
    Location
    Finland
    Posts
    18
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Thumbs down Switching between .ui and .h/.cpp (and help)

    I suspect this has been asked already, but I couldn't think of proper search keywords so here goes. I recently got started with the new Nokia version of Qt and one thing has been bothering me above all else with Creator.

    How in damnation am I supposed to effortlessly switch between graphically editing the UI and editing source code?

    Clicking on a .ui file in the open file list opens the UI editor while hiding the open file list and escape from the UI editor is only possible via the Esc key or mousing aaaallll the way to the upper right corner for the close-X. This means that any .ui files in the open file list are traps that, when clicked on, force me to abruptly change the way I was browsing through that list. I could double-click on the files in the full tree view, but single-clicking on them in the open file list is much easier.

    Worse still, when I return from the UI editor via Esc or Close, all I get is the stupid XML view for the .ui with the warning-ish text "can only be edited in Designer", instead of the .h or .cpp I was working on moments ago. Plus, the "Design" button is disabled unless an .ui file is open as text.

    Secondly, is there any way to have the built-in help open while editing code/UI at the same time, besides opening a browser for doc.qt.nokia.com? Qt Assistant is no longer a separate program, apparently.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Switching between .ui and .h/.cpp (and help)

    1. You can switch to the one of open files using mouse

    2. I don't think this is yet possible in designer mode, it is possible in editor/code mode
    Attached Images Attached Images

  3. #3
    Join Date
    Aug 2011
    Location
    Finland
    Posts
    18
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Switching between .ui and .h/.cpp (and help)

    I had forgotten about that drop-down box, but it, too, is inferior to the Open Files List because instead of a single click you have to click, point, and click again. I mentioned the deficiencies in switching back and forth between code and .ui to a colleague and he agreed that this was a dreadful feature in Creator. I'd also much prefer a separate program for documentation, rather than a mere pane in the IDE.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Switching between .ui and .h/.cpp (and help)

    Ctrl+2 and Ctrl+3 select the Edit and Design modes respectively: no mouse required.
    Ctrl-Tab can quickly cycle to another open source file (away from the UI XML, which I agree is largely pointless).

    You can press F1 with the cursor over a keyword to open help side-by-side with the source. Ctrl-6 switches to the full-blown help view. Assistant is still a separate application if you wish to run it that way. A Start menu icon is not created by default: you have to choose one from the potentially many Qt versions you have installed in parallel and add the documentation to it.

Similar Threads

  1. Switching Form;
    By Splatify in forum Newbie
    Replies: 7
    Last Post: 2nd February 2011, 05:19
  2. Replies: 2
    Last Post: 15th December 2010, 10:53
  3. Switching between 2 Forms
    By strateng in forum Qt Programming
    Replies: 6
    Last Post: 4th June 2010, 08:09
  4. Switching 5.2 from 5.0.2
    By baray98 in forum Qwt
    Replies: 1
    Last Post: 11th May 2009, 17:59
  5. switching between pages
    By Kapil in forum Newbie
    Replies: 9
    Last Post: 6th March 2006, 10:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.