Results 1 to 6 of 6

Thread: Issues porting from 4.8 -> 5.3 with QtDestkop

  1. #1
    Join Date
    Feb 2010
    Location
    Los Angeles
    Posts
    61
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Issues porting from 4.8 -> 5.3 with QtDestkop

    Hello All,

    I have to port code from 4.8 using QtDesktop to 5.3. After compile and run I get an error:

    StyleItem is not a type

    This is the code:
    Qt Code:
    1. import QtQuick 1.1
    2.  
    3. BaseSlider{
    4. id: slider
    5.  
    6. property alias tooltip: toolTip.text
    7.  
    8. groove: StyleItem {
    9. anchors.fill:parent
    10. elementType: "slider"
    11. sunken: pressed
    12. maximum: slider.maximumValue*100
    13. minimum: slider.minimumValue*100
    14. step: slider.stepSize*100
    15. value: slider.value*100
    16. horizontal: slider.orientation == Qt.Horizontal
    17. enabled: slider.enabled
    18. hasFocus: slider.focus
    19. }
    20.  
    21. // This is margins for the slider length. They should be equal around the half of the handle object width.
    22. leftMargin: 11
    23. rightMargin: 11
    24.  
    25. handle: handleImg
    26. hoverEnabled: false;
    27.  
    28.  
    29. Component {
    30. id: handleImg
    31.  
    32. Image {
    33. id: rect
    34.  
    35. property string enabledStateImgSrc : mouseArea.containsMouse ? "images/PlayerSliderBtns_Hover.png" : "images/PlayerSliderBtns_ActiveMC.png";
    36. source: enabled ? enabledStateImgSrc : "images/PlayerSliderBtn.png";
    37. MouseArea {
    38. id: mouseArea
    39.  
    40. hoverEnabled: true
    41. anchors.fill: parent
    42. onEntered: { showTimer.start(); }
    43. onExited: { toolTip.shown = false; showTimer.stop(); }
    44. }
    45. Timer {
    46. id: showTimer
    47.  
    48. interval: 600
    49. onTriggered: toolTip.shown = true;
    50. }
    51.  
    52. }
    53. }
    54. ToolTip{
    55. id: toolTip
    56.  
    57. offsetX: width/3
    58. offsetY: 1.5*height
    59. }
    60. valueIndicator: null
    61. }
    To copy to clipboard, switch view to plain text mode 

    Any suggestion what is missing here?
    Thanks in advance
    Markus

  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: Issues porting from 4.8 -> 5.3 with QtDestkop

    Is there a specific reason that you are using QtQuick 1 and not QtQuick 2? Do you have Qt desktop components installed? Where is the import for them?
    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 2010
    Location
    Los Angeles
    Posts
    61
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Issues porting from 4.8 -> 5.3 with QtDestkop

    I was reading here that Qt Desktop Components are now part of QtQuick.
    There is no reason I am using QtQuick 1 and not QtQuick 2. The article did not mention I have to use 2.
    I have never ported anything with QML so this is all new to me.
    The original code before my 'port' looked like this:
    Qt Code:
    1. import QtQuick 1.1
    2. import QtDesktop 0.1 as Desktop
    3.  
    4. BaseSlider{
    5. id: slider
    6.  
    7. groove: Desktop.StyleItem {
    8. anchors.fill:parent
    9. elementType: "slider"
    10. ...
    To copy to clipboard, switch view to plain text mode 

  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: Issues porting from 4.8 -> 5.3 with QtDestkop

    I have no idea what article you mean and no, Qt desktop components is not part of QtQuick now. It has been replaced by QtQuick controls which has a different api.
    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.


  5. #5
    Join Date
    Feb 2010
    Location
    Los Angeles
    Posts
    61
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Issues porting from 4.8 -> 5.3 with QtDestkop

    OK Thanks that was a misunderstanding. I downloaded the Qt desktop components now but the 'make' step failed, producing this error :

    ./qtmenu.h:30:10: fatal error: 'QtGui/qmenu.h' file not found

    What am I missing here?

  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: Issues porting from 4.8 -> 5.3 with QtDestkop

    You cannot just build Qt Desktop Components for Qt5, they are not compatible. You'd have to port the plugin to Qt5 first (QMenu is now part of QtWidgets and not QtGui).
    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. Issues with QKeySequence when porting to Qt5
    By fedcer in forum Qt Programming
    Replies: 0
    Last Post: 3rd April 2013, 16:05
  2. Porting from V++6 to QT
    By mahadasari in forum Qt Programming
    Replies: 1
    Last Post: 17th February 2011, 14:36
  3. help for porting
    By dmartino in forum Newbie
    Replies: 4
    Last Post: 29th October 2010, 18:20
  4. Porting 4.4.2 to 4.7.0
    By Lee B in forum Newbie
    Replies: 10
    Last Post: 18th October 2010, 21:20
  5. linux to windows porting issues
    By qtprogrammer12345 in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2008, 07:45

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.