Results 1 to 6 of 6

Thread: Some Questions

  1. #1
    Join Date
    Jun 2012
    Posts
    4

    Default Some Questions

    1.Can be edit the ui extension file outside the qt designer....in any editor??If yes then what step will take.

    2.ClassA
    {
    .....
    .....
    };
    Class B : Q_Object
    {
    ...........
    ..........
    };
    Can be do the singnal and slot mechanism between these classes if yes then how.

    3.Can we use both horizental and vertical layout in the same dialog.Can be use the horizental layout twice in a dialog.If yes then what error will occcur.

  2. #2
    Join Date
    Nov 2011
    Posts
    79
    Thanks
    5
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Some Questions

    1. ui is XML file, you can edit it with any text editor
    2. classA must inherit from QObject and mast have O_OBJECT macro. in one class you define signal and in other one define slot and connect signal to slot.
    3. here i cant understand what is a problem

  3. #3
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Some Questions

    3. You can't use one specific layout twice but you can use as many layouts and sub layouts, horizontal, vertical or grid, as you want. I think you may need child Widgets to apply the sub layouts in that way:

    (This is NO Qt code!)
    Qt Code:
    1. topWidget
    2. -> topVerticallayout
    3. -> rowWidget1
    4. -> horizontalLayout1
    5. -> columnwidget11
    6. -> columnwidget12
    7. -> rowWidget2
    8. -> horizontalLayout2
    9. -> columnwidget21
    10. -> columnwidget22
    11. -> rowWidget3
    12. -> horizontalLayout3
    13. -> columnwidget31
    14. -> columnwidget32
    To copy to clipboard, switch view to plain text mode 

    This very symmetrical structure, though, is normally better done with one gridLayout, which is very flexible.

  4. #4
    Join Date
    Jun 2012
    Posts
    4

    Default Re: Some Questions

    Hi
    Thnaks for reply.........1.but if we edit the XML file in any editor then to reflect the change we should compile it in QT designer.
    2.I also think that without the help of Q_object we can't use signal and slot........
    3.Why we can't use one specific layout twice

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Some Questions

    Quote Originally Posted by vimal View Post
    Thnaks for reply.........1.but if we edit the XML file in any editor then to reflect the change we should compile it in QT designer.
    Designer doesn't compile anything. If you modify the ui file externally (which you shouldn't do), you don't have to open it in Designer.

    2.I also think that without the help of Q_object we can't use signal and slot........
    Without Q_OBJECT you can't use signals and slots.

    3.Why we can't use one specific layout twice
    You can use the same layout class (or different ones) as many times as you want.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Jan 2012
    Location
    Dortmund, Germany
    Posts
    159
    Thanks
    69
    Thanked 10 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Some Questions

    Because it is only one instance. But you can instantiate as many layouts as you wish:
    QHorizontalLayout *hLay1 = new (QHorizontalLayout());
    QHorizontalLayout *hLay2 = new (QHorizontalLayout());
    QHorizontalLayout *hLay3 = new (QHorizontalLayout());
    and use them. But you can't use hLay1 twice.

    You can't drive the BMW that your wife wants to take. That would lead to serious trouble when she tries to get in and take a seat (she'd crash). But you are always allowed to buy a similar one - depending on your ressources of course. Luckily memory is cheaper than bavarian cars.

Similar Threads

  1. Need help with two questions please
    By phantom2323 in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2012, 11:33
  2. Qt like VS add-in questions
    By GreenScape in forum General Programming
    Replies: 0
    Last Post: 4th August 2010, 09:28
  3. Several questions
    By zlatko in forum Qt Tools
    Replies: 3
    Last Post: 25th May 2007, 08:47
  4. Sql questions
    By Nb2Qt in forum Qt Programming
    Replies: 4
    Last Post: 15th February 2007, 22:53

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
  •  
Qt is a trademark of The Qt Company.