Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Adding "User information" to a QMetaProperty

    3
    0 Votes
    3 Posts
    1k Views
    A
    Thanks, I wasn't aware of this. It's not exactly what I'm looking for, but I might find a way to make it work for this.
  • 0 Votes
    2 Posts
    1k Views
    V
    on selecting this bellow mention component i am unable to select those track on which my mouse once over. @Component { id: trackDelegate Item { id: parentItem width: list.width - 50 height: (albumsDetail.height < minHeight ? minHeight : albumsDetail.height) anchors.left: parent.left visible: visibility Item { id: albumsDetail Image { id: artwork height: 100 width: 100 source: coverart smooth: true z: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 8 } BorderImage { id: artworkShadow height: artwork.height width: artwork.width smooth: true anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenterOffset: 4 anchors.top: parent.top anchors.topMargin: 12 z: 4 opacity:0.7 source: "qrc:/resources/images/image-shadow.png" } BorderImage { id: artworkSelected height: artwork.height + 20 width: artwork.width + 20 smooth: true anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenterOffset: 2 anchors.top: parent.top z: 0 opacity: (selected === false ? 0 : 1) source: "qrc:/resources/images/artwork-selected.png" } MouseArea { id: markerArea; anchors.fill: artwork; hoverEnabled: true onClicked:{ if(selected === true) { selected = false; artworkSelected.opacity = 0.7; } else { selected = true; artworkSelected.opacity = 1; } } onEntered: { if(artworkSelected.opacity != 1) { artworkSelected.opacity = 0.7; } } onExited: { if(artworkSelected.opacity != 1) { artworkSelected.opacity = 0; } } } } Item { id: tracksDetail width: parent.width - albumsDetail.width - 100 height: lstTracksDetail.height anchors.top: parent.top anchors.topMargin: 10 anchors.left: albumsDetail.right anchors.leftMargin: 100 ListView { id: lstTracksDetail height: (tracklist.length * rowHeight) + 20 interactive: false model: tracklist anchors.top: parent.top anchors.topMargin: 10 delegate: trackRowDelegate } } Loader { sourceComponent: rowSeparator; width: parent.width + 10; anchors.bottom: (tracksDetail.height < albumsDetail.height ? albumsDetail.top : tracksDetail.top) visible: (index === 0 ? false : true) } Component { id: rowSeparator Rectangle { height: 1 color: "#000000" opacity: 0.1 } } } }@
  • In Android some Greek characters are rendered as rectangles

    3
    0 Votes
    3 Posts
    2k Views
    a-r-tA
    Thank you Andre for the reply With QfontDialog running in android emulator I see installed only this font type "Android Emoji" Using the … QFont(“Android Emoji", 12); still have the stretched vowels characters as rectangle. :o(
  • Can position of Dropdown list can be fixed on screen

    7
    0 Votes
    7 Posts
    3k Views
    A
    One way would be to patch Qt I think, and tweak the algorithm that determines the placement so that it always returns "below". [quote author="pragati" date="1349254540"]Some requirements are meant to be followed directly, you cannot change them... [/quote] This doesn't sound as one of them...
  • How can i set QStandardItem in the row which have parents?

    4
    0 Votes
    4 Posts
    3k Views
    C
    If I understand correctly, there is no analog of QStandardItemModel::setItem() (which applies for tables) in the context of a tree structure. If I want to fully change an item at a given position in my tree, first I have to cut the branch beneath the parent (removeRow()) and second, graft there the new item (insertRow()). Am I wrong? Second thought: please forget, forgive or delete this post, the answers above are clear.
  • Custom Drag&Drop cursors

    3
    0 Votes
    3 Posts
    3k Views
    M
    This won't work, because after dragEnterEvent and dragLeaveEvent handlers QDragManager reset cursors. So changing cursor there will not have any effect. Actually the correct way is to keep QDrag object and to call setDragCursor() every time we want to change it. But it is impossible now (4.8.3). So I've provided a "patch":https://codereview.qt-project.org/35893
  • PHP request from qt

    3
    0 Votes
    3 Posts
    3k Views
    C
    If the remote server is returning the PHP source code of a PHP page rather than the result of running the PHP then the remote server is incorrectly configured and this is not a Qt problem.
  • Error when using QT Creator.

    2
    0 Votes
    2 Posts
    1k Views
    A
    Actually scratch that, I just realized the stupid mistake I made.
  • Qtcreator 2.5.2, qt 4.8.1,,, external dll?

    6
    0 Votes
    6 Posts
    2k Views
    mrdebugM
    Only an "unknow error". See the screenshot at http://www.denisgottardello.it/test02.jpg . Is not a problem about the location of the dlls. If I move those to another folder I obtain a different error.
  • Append file

    6
    0 Votes
    6 Posts
    3k Views
    M
    @Vidhya, did you succede in your attempt? In my case, I want to append audio but it appears Qt 4.8 lib doesn't support HTML5 tag. Is there anyway around this limitation? Any advice would be highly appriciated.
  • PATH to libgcc_s_dw2-1.dll and mingwm10.dll in Qt 4.8.1

    5
    0 Votes
    5 Posts
    5k Views
    N
    [quote author="franku" date="1343464341"]What about going relative to one of the paths (didn't test, just an idea)? @ PATH_TO_DEPLOY_LIBS = $$[QT_INSTALL_BINS]../../../../../mingw/bin @[/quote] I have the same issue and I used this method but this is a workaround that only work for the current (and past) QtSDK (sdk version 1.2.1 with qt-4.8.1). The question is: If you would like to use an independent MinGW installation, and you configured your custom toolchain in qtcreator, is there a way to retrive the path of the used compiler from within the .pro project file (and to locate the runtimes .dll...)? Something like an environment variable "QMAKE_COMPILER_DIR" (witch does not exist) or such. Thanks in advance! P.S.: The current distribution of Qt4.8.3 have a copy of these files under <path>\Qt-4.8.3\bin (corresponding to $$[QT_INSTALL_BINS]) Why? I guess I should use the one shipped with the mingw distribution used to compile. (In the sdk there are different version for different toolchains...)
  • [Qt Creator Plugin]

    7
    0 Votes
    7 Posts
    3k Views
    T
    Ignore the output, it is not critical in any way. What does Help->About plugins say about your plugin? Is it listed? Have you checked the dependencies of your plugin (e.g. running depends.exe on your binary)? Is everything found?
  • Application that install browser plugin

    15
    0 Votes
    15 Posts
    6k Views
    A
    Sorry, does not work in Internet explorer
  • Qmake "target" variable

    4
    0 Votes
    4 Posts
    6k Views
    sierdzioS
    Ad. 1. See my snippet. As I've said, it might be wrong, qmake can be nasty at times. Ad. 2. OK then, that can be a problem. You can investigate usage of other build systems here: cmake, scons, qbs. Ad. 3. AFAIK, target.path is a simple variable, it does not know about anything. That is why I proposed to create another one ("second.path") in my snippet above.
  • QImage, load(), good for Debug, fail for Release

    5
    0 Votes
    5 Posts
    3k Views
    W
    Thanks so much. The problems solved
  • 0 Votes
    1 Posts
    898 Views
    No one has replied
  • How to implement a pop-up slider in menu?

    3
    0 Votes
    3 Posts
    4k Views
    L
    [quote author="Andre" date="1349156271"]This is certainly possible to do. The first step would be to create the popup button. I'd look at "this example":http://blog.qt.digia.com/2007/06/06/lineedit-with-a-clear-button/ for starters on how you can trick Qt to put a button inside a line edit. The next step is the actual popup widget. For that, you can use some window flags. You create the widget without a parent and with the Qt::Popup window flags. Then, you position it so that it appears right under the lineedit-with-button widget. Put a slider on top, and you're in business.[/quote] Thanks! I think this is the way to go.
  • What is difference bwteen UI and QSS file

    4
    0 Votes
    4 Posts
    5k Views
    A
    Lukas is right. Noteworthy is also that you can set the QSS also from inside the .ui file. You should understand that there is a difference between the CSS you use for HTML and the QSS styling you can do with Qt. CSS allows for a lot of layout-like tasks. QSS not so much. QSS is more at the level of styling individual widgets (or large numbers of them in one go), but does not describe their relative placement.
  • Skin Qt controls

    6
    0 Votes
    6 Posts
    7k Views
    C
    OK. I see. Thank you so much. I will try style sheet, since it seems to be similart to CSS, which I am familiar with .
  • Build QML into an EXE

    5
    0 Votes
    5 Posts
    2k Views
    C
    OK. I see. Thank you so much. It seems: If I using C++, then all the programming logic must be put outside. If put QML as a Qt resource, then it is possible for others to take the QML outside the program and decode the programming logic, which is undesirable for most of the cases. Thanks