Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • 0 Votes
    3 Posts
    2k Views
    L
    Moving the qml directory into the directory where the exe resides did the trick. I then followed your advice and added to the Path environment variable the following: C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin this led to procedural entry errors... Modifying this path to the msvc2008\bin and rebuilding for 2008 targets did however work. Thanks for the help.
  • Maximize widget upon main window maximize [Solved]

    7
    0 Votes
    7 Posts
    9k Views
    M
    Please be sure and edit your original post and add [Solved] to the title. Thanks!
  • Qt thread connect to qml

    6
    0 Votes
    6 Posts
    3k Views
    M
    If you're directly accessing m_view from anywhere other than the main thread, it's incorrect and invalid.
  • Impact of Qt on ICU ?

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • ActiveQt and Ms office

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 1 Votes
    4 Posts
    5k Views
    A
    Ok, for those interested, I have 'solved' my problem by doing the following: @static bool firstTime = true; static QColor borderColor = QColor(); if (firstTime) { QFrame frame; QImage image = QImage(widget->size(), QImage::Format_ARGB32_Premultiplied); frame.setFrameShape(QFrame::StyledPanel); frame.render(&image); borderColor = QColor(image.pixel(0, 0)); firstTime = false; }@
  • How to properly design a settings dialog?

    6
    0 Votes
    6 Posts
    6k Views
    ?
    Yep, if you already have the widgets you just add them to the stacked widget and you are good to go, if you followed OOP ethics there will be nothing to rewrite, if not, it will be a valuable lesson :P I mean if you really NEED to rewrite your code that would pretty much mean you have made a mess, going against the concepts of encapsulation and code reusability, which is always a bad idea.
  • Sqlite3 string encoding problem

    3
    0 Votes
    3 Posts
    2k Views
    L
    bq. insert into a values(... According to what you have written a is a column, aa is the table. Please post real code!
  • Getting model in delegate with custom QAbstractListModel and QML Repeater

    2
    0 Votes
    2 Posts
    3k Views
    P
    So I found out that I can disable flicking on ListView with interactive property. But still is it possible to provide instance of model class via its data method?
  • 0 Votes
    3 Posts
    2k Views
    J
    Thanks for your answer Gerolf. So, yes I want to add a COM interface to my executable. I thought QAxServer was made for that (but not only for that, since it allows creation of standalone ActiveX)
  • 0 Votes
    6 Posts
    4k Views
    A
    If you created your UI using Designer, then you can manipute all widgets on there using the same way you setup the connections. [[doc:QToolButton]] is a [[doc:QAbstractButton]], which has a property called checked. It seems logical to me that calling: @ m_ui->myToolButton->setChecked(false); @ would make sure your toolbutton is unchecked. However, I would certainly considder abstracting your actions in QActions instead. You can add QActions to your toolbar, and then manipulate the action instead of the tool button directly. This way, it is easier to offer the same action at multiple places simultaniously, and keep their state in sync. I often even expose functionality in my internal API as QActions, so I can bundle the information about the state of the action (it's availability for instance) and the action itself into one neat class.
  • 0 Votes
    6 Posts
    6k Views
    B
    Good work Andre!
  • Compiling on MacOSX

    2
    0 Votes
    2 Posts
    4k Views
    B
    I think I have it figured out. My *.pro file included a section to build the i386, ppc, and x86_64 architectures when I only wanted the x86_64 architecture built. I fixed this by replacing "CONFIG += x86 ppc" with "CONFIG += x86_64" in the *.pro file, which is used to create the xcodeproj file.
  • Can't get Drag and Drop to Work:

    5
    0 Votes
    5 Posts
    8k Views
    X
    I also created a new project it now it works too. Properly it was because i always got an Error code "could nit initialize OLE(error 80010106)". Thanks for helping^^
  • QSqlQueryModel::Data() Speed

    4
    0 Votes
    4 Posts
    3k Views
    D
    If you said it takes 5 seconds, and you have 13000 rows, that means one query takes 0.3ms. that's not too bad. I don't know how QSqlQueryModel works internally, whether it actually queries the database when accessing indexes or only reads the internal model which was built with setQuery. If it actually queries the database everytime, then 0.3ms is actually quite good. Either way, if you want more performance, you'll need to get that data inside an intermediary cache that's specifically built to perform the accesses you want with high performance. You could either build that ontop of QSqlQueryModel or as a replacement. This might become alot of work, so make sure you have no other way around this, i.e. improved program logic that you don't even need to access 13000 indexes instantly.
  • Multiple hyperlinks in one label text

    2
    0 Votes
    2 Posts
    3k Views
    L
    The linkActivated() signal passes the clicked link, which makes it rather easy to react differently (given that meaningful link names are provided). @ setText("<a href='agree'>Agree</a>, or you can always <a href='cancel'>Cancel</a>."); void activateLink(const QString &link) { if (link == "agree") { agree(); } else if (link == "cancel") { cancel(); } } @
  • [Solved] blob data in sql server 2008

    2
    0 Votes
    2 Posts
    2k Views
    K
    hi dears:D i found the problem i should use image type , it works good too
  • Mysterious SegFault only if not run after QMake

    38
    0 Votes
    38 Posts
    15k Views
    M
    Okay, got the public link to a .rar containing the project! http://dl.dropbox.com/u/15926661/ATL2.rar
  • [Solved] QGraphicsIte setPos , moveBy - how do they work?

    3
    0 Votes
    3 Posts
    7k Views
    M
    Thanks sraboisson! Wonderful explanation. Ah so 'increment' part comes from mapToParent as you showed in the code. I think the reason it did not occur to me was I didn't think the origin changed everytime setpos(mapToParent(..)) was called.
  • Hello QT

    7
    0 Votes
    7 Posts
    4k Views
    ?
    I happen to prefer C++ myself, it is the more powerful and efficient option albeit slower to develop in, the only downside is, at least to me it no longer seems to be a priority in the Qt development cycle. Judging from the last Qt Developer Days QML gets like 80% of the attention and my one apprehension is eventually the C++ framework will lag behind, hopefully thou it will never come to it. My problem with the C++ API is the GUI part uses native styling by default, which forces me to use very little of the stock components, instead subclassing the deeper abstract base classes, overloading events and so I get a GUI that looks and \behaves a bit more modern and identical across different platforms, working adequately with multi-touch and so on. If the Qt development team decides to step up and do the same to the stock GUI components this will certainly breathe more life into the C++ API, but for now, sadly, it is Qt Quick that has the priority. JavaScript is not that hard BTW, and you can easily get away with only using it for property binding and some minimal logic, while still keeping heavy duty logic in C++.