Results 1 to 6 of 6

Thread: 2 little questions

  1. #1
    Join Date
    May 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default 2 little questions

    Hi,

    I just wanted to know if inside the Designer :
    1. we can set shortcut to an action. There is a field, but when I edit my action I cannot see any way to do this.
    2. there is a way to set Stretch Factor to a splitter.


    Thanks.

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

    Default Re: 2 little questions

    Quote Originally Posted by kib2 View Post
    [*]we can set shortcut to an action. There is a field, but when I edit my action I cannot see any way to do this.
    Yes. After choosing the shortcut field, simply press the shortcut you want to assign.

    there is a way to set Stretch Factor to a splitter.
    Stretch factors are in the sizePolicy group.

    If you're asking about stretch factors of objects within a splitter, they will work properly although as far as I remember splitters in Designer might not respect them.

  3. #3
    Join Date
    May 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 2 little questions

    Quote Originally Posted by wysota View Post
    Yes. After choosing the shortcut field, simply press the shortcut you want to assign.
    Yes, sorry I forgot to tell "without going in the Property Editor", I wanted to set them directly inside the "Action Editor" when double clicking on an action.

    Quote Originally Posted by wysota View Post
    Stretch factors are in the sizePolicy group.

    If you're asking about stretch factors of objects within a splitter, they will work properly although as far as I remember splitters in Designer might not respect them.
    I wasn't aware of this and when I watched the resulting code, I have doubts.
    If I make it by hand, I will code something like this (it's in Python, but we don't care in fact):

    Qt Code:
    1. self.splitter.setStretchFactor(0,6)
    2. self.splitter.setStretchFactor(1,1)
    To copy to clipboard, switch view to plain text mode 

    In the resulting code, I don't have any of these.
    But you're right, the Designer does not seems to respect the splitters policy when previewing your form.

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

    Default Re: 2 little questions

    Quote Originally Posted by kib2 View Post
    Yes, sorry I forgot to tell "without going in the Property Editor", I wanted to set them directly inside the "Action Editor" when double clicking on an action.
    No, the shortcut field is read-only. I'm sure you might post a suggestion to Qt Software about it though.

    I wasn't aware of this and when I watched the resulting code, I have doubts.
    "My" uic generates correct code that includes stretch factors

    In the resulting code, I don't have any of these.
    I do.

  5. #5
    Join Date
    May 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: 2 little questions

    Quote Originally Posted by wysota View Post
    No, the shortcut field is read-only. I'm sure you might post a suggestion to Qt Software about it though.
    Ok, I'll post a message.

    Quote Originally Posted by wysota View Post
    "My" uic generates correct code that includes stretch factors
    You've made your own one ?

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

    Default Re: 2 little questions

    No, I mean the default one Qt-C++ uses. I used "my" as an opposite to "your".

Similar Threads

  1. QTreeView questions about view doubles and more
    By davisjamesf in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2007, 01:39
  2. Memory management questions (im new to Qt)
    By scarvenger in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2007, 08:41
  3. QKeyEvent questions
    By bglidden in forum Qt Programming
    Replies: 1
    Last Post: 3rd October 2006, 07:29
  4. 2 Questions about layouts
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2006, 14:54
  5. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 13:25

Tags for this Thread

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.