Results 1 to 4 of 4

Thread: Designer and view factory

  1. #1
    Join Date
    Feb 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Designer and view factory

    Hello all,

    In my code usually for lets say some dialog I will have:
    controller class - handles logic
    view class - display view
    view factory - will handle creating of view classes

    the problem is that if I use designer I can't use my view factory as it just
    initiate the view class

    is there work around for that ?
    thanx
    Eli

  2. #2
    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: Designer and view factory

    Designer doesn't initiate anything. It creates a class you need to use in some other class that inherits QWidget. So when you subclass you have full control over what is going on and you can design the class any way you see fit as long as you eventually call setupUi() on the object generated by Designer.
    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.


  3. #3
    Join Date
    Feb 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer and view factory

    My problem is when I place my own widget in the designer
    so the generated ui file will contain

    MyOwnWidet *a = new MyOwnWidget();

    while I want the all of my gui component will come from the factory
    and will not be initiated that way.

    thanx

  4. #4
    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: Designer and view factory

    In that case Designer can't help you, you need to write your code manually or modify the file created by uic but every time you change something in the ui file, you'll have to redo all the modifications.
    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.


Similar Threads

  1. QWidget or Graphics view Framework in SCADA
    By SamSong in forum Qt Programming
    Replies: 3
    Last Post: 29th May 2018, 10:57
  2. Qt Creator Integrated Designer
    By fnmblot in forum General Discussion
    Replies: 1
    Last Post: 21st May 2009, 22:16
  3. Cannot drop widgets in Qt Designer 4.4.0
    By DerSchoeneBahnhof in forum Qt Tools
    Replies: 2
    Last Post: 19th June 2008, 17:18
  4. tableView Problem
    By hrcariaga in forum Newbie
    Replies: 5
    Last Post: 7th February 2008, 08:29
  5. QPixmap designer property not showing up
    By high_flyer in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2006, 19:56

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.