Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QTreeView & custom Model showing columns of checkboxes

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • QT with qws using CL compiler

    1
    0 Votes
    1 Posts
    775 Views
    No one has replied
  • Have someone accomplished Building Qt under a Static Build?

    13
    0 Votes
    13 Posts
    7k Views
    A
    Checking the compilation with MSVC2010 ... let's wait EDIT Got passed through the second request which was nmake /B, that step always got me stuck in (while using mingw32-make sub-src cmd) now with MSVC2010 everything seems to be running quite smooth!!! no the off side this has is that is 1:56 AM for me! and this process ppl says takes to 40 mins to 4 hours depending on PC I got Win7 64Bit machine with AMD Athlon Dual Core @ 2.50GHz with 4GB RAM I hope this runs faster.. XD 2nd EDIT Just can't believe this!!! I don't know if it's the whole process at all or just my lame computer... I'm compiling it and I have started the whole process at 1:something AM I left my PC overnight expecting that it would finish or something... for my surprise....... IT STILL GOING!!! !http://i.imgur.com/qP6Nt.png! THIS PROCESS HAS GONE TOO FAR RUNNING WITH MORE THAN 10 HOURS!!! Now going straight into my point... making sure I will get static libraries... once this whooole process finishes will I have Static, static, static libraries? I added the -static argument into the CMD line when launching the command, so that will mean I will have static libraries indeed? I just wanna make sure because I don't wanna have the disillusion myself knowing that happens to be like more than 9 hours and I still have shared libraries that would make me go insane right then. 3rd EDIT Done!! DONE DONE DONE Finally! hahaha I'm so excited!! now that I have spent more than 10 hours is there a way I could make a backup of those libraries so I can later use them, If by some chances of life I loose them, or if I hit up with a virus and had to re-format my PC, is there a way I could deploy them over a new (other) fresh installation of Qt-5.0.0?
  • [Solved] How to drag the size of windows?

    6
    0 Votes
    6 Posts
    2k Views
    S
    You are welcome, Kindly Edit your first post and prepend [Solved] to the title. Regards Soumitra.
  • QProcess crashes

    5
    0 Votes
    5 Posts
    3k Views
    M
    You still are dereferencing the "MyProcess" pointer. But is that pointer valid at all ??? I mean: Do you assign the address of a QProcess object to that pointer before you try to dereference? Also, as said before, you also have problem if the object has already been deleted/destroyed... (If you get a crash on pointer access, it's almost always either a NULL pointer or a dangling pointer!)
  • Widget follow the size of another Widget

    6
    0 Votes
    6 Posts
    15k Views
    Chris KawaC
    hans977 This is no way to do layouts. What you're suggesting is reinventing the wheel (QLayout to be precise) and manually programming all the logic that Qt is actually designed to do for you. l3e0wulf I don't have a clear picture what you want to achieve but classic example of a splitter layout would be something like this: @QWidget* parentWidget = new QWidget(); QVBoxLayout* layout = new QVBoxLayout(); QSplitter * splitter = new QSplitter(); QWidget * w1 = new QWidget(); QWidget * w2 = new QWidget(); splitter->addWidget(w1); splitter->addWidget(w2); layout->addWidget(splitter); parentWidget->setLayout(layout);@
  • [Solved] Main menu does not respond to the style sheet

    3
    0 Votes
    3 Posts
    1k Views
    C
    Thank you very much, sorry for the mistake
  • OSX Service and QApplication::macEventFilter()

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Running the examples in Qt5

    5
    0 Votes
    5 Posts
    6k Views
    S
    I've been working on this thing for the past 3 weeks! You are correct about the MS compiler, but I did make the mistake of trying the standalone compiler instead (which didn't work) and installed the whole VS package, which did show up in the Qt compiler listing so that I can now use it. I also tried the minGW version on another computer but that is another discussion since it also seems to have the same problems. Anyway, the MS version now shows up and builds and runs several of the examples which I could not do at all before. When I try to compile the Composition Modes example the compiler gives me the following error "LNK1181: cannot open input file 'demo_shared.lib'"! I did a file seek for this file on the computer and the file is not on the computer anywhere! Maybe you can figure this out as I have no clue what to do with this problem. Maybe fixing this problem will get the whole thing up and running so that I can start usig this IDE.
  • [solved] Aligning widgets in center horizontally in a vertical box layout

    3
    0 Votes
    3 Posts
    81k Views
    H
    [quote author="inspired" date="1357148829"]try this QLayout::setAlignment ( QWidget * w, Qt::Alignment alignment ) meaning layout->setAlignment(line, Qt::AlignHCenter); (repeat for each one) and btw, where do you apply the layout for the widget? win->setLayout(layout); or is it automatically applied with the layout constructor?[/quote] Thanks Inspired. That seems to work. If I apply the alignment to the frame/line it will diaper, but I do not need to center it so we should be fine. I guess the layout gets applied to the widget when I set its parent in the constructor. I seems to work that way although I never did see that in the documentation.
  • Is it ok to redistribute Qt library?

    5
    0 Votes
    5 Posts
    4k Views
    S
    [quote author="JKSH" date="1357129781"] At the bottom of this page, it says "... the Qt logo is a registered trade mark of Digia plc", so I'm not sure if you're allowed to use the Qt logo in your installer. Contact Digia to ask. [/quote] Good to know. I will do so [quote author="JKSH" date="1357129781"] I strongly suggest you don't install any DLLs into the Windows system directory -- that directory is for core system files only. Instead, install the DLLs somewhere else (e.g. C:\Qt or C:\Program Files\Qt), and add that folder to the system PATH [/quote] I just noticed that today and changed my installer :) Having a little experience with MS Windows, it looks strange and irregular to me! [quote author="JKSH" date="1357129781"] I'm confused by "Qt 5.0.0 Runtime libraries version 0.1.0"; how do you envision "Qt 5.0.0 Runtime libraries version 0.2.0" to be different? And what how will your installer be labelled when Qt 5.0.1 is released? [/quote] Well, it's a little bit of trick there! First one in Qt version and second is Build version. Each Qt version is supposed to have a series of builds that they will tagged with some phrases. For example for Qt 5.0.0 there will be 0.1.0-mingw-64, 0.1.0-msvc11-64, 0.1.0-mingw-32, 0.1.0-msvc11-32. And when ready, in another compile I may fix some configuration bugs, apply more optimization, or change installer itself. Then for Qt 5.0.0 , build versions will be 0.1.1-mingw-64, 0.1.1-msvc11-64, 0.1.1-mingw-32, 0.1.1-msvc11-32 ... For Qt 5.0.1 versions will restart to 0.1.0. [quote author="Krzysztof Kawa" date="1357134040"] Btw. I always thought DBus was a linux specific thingie? Is it also available on Windows?[/quote] [quote author="JKSH" date="1357135056"]The D-Bus project has officially accepted the Windows port into their code base (http://www.freedesktop.org/wiki/Software/dbus#Windows_port ), but I get the impression that it's not very stable yet. [/quote] I made a Windows Service using startsrv that runs dbus-daemon in background. (In the newer version of installer there is a choice to start that service) DBus works pretty fine for me on windows. Since it has been officially approved windows port, I don't think of any problem. It has a lot of inconsistent code that makes it very difficult to compile on windows, but in runtime looks pretty stable.
  • QGLWidget draws in the bottom left corner[Solved]

    4
    0 Votes
    4 Posts
    2k Views
    Y
    [quote author="ZapB" date="1357142425"]Where do you call glViewport()? You need to call this to set the viewport to be the same size as your window, so adding glViewPort( 0, 0, w, h) to your resizeGL() function may well help.[/quote] Thanks to all. use @glViewport( 0, 0, w, h);@ resolved the issue.
  • QtPropertyBrowser doesn't compile as DLL (win32/VS/Qt5.0.0)

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • QLabel->setPixmap scalable

    2
    0 Votes
    2 Posts
    2k Views
    M
    The function scaled() should help you: @ MyLabel->setPixmap(QPixmap(":/logo.jpg").scaled(...)); @ The parameters of the function scaled() can be found here: http://qt-project.org/doc/qt-4.8/qpixmap.html#scaled
  • Combobox with delete-item buttons at items

    7
    0 Votes
    7 Posts
    8k Views
    A
    [quote author="real name" date="1357133282"] i see no problem to overwrite QItemDelegate::paint but what does it mean 'add "add,edit and delete" items QPicture type'?[/quote] Yes, when I say Add,edit and delete i refer to QPicture. But I have not tested it. however i think it should work if you overwrite methods but its not easy.
  • Widget cross-platform (minimum) size constraint problem.

    4
    0 Votes
    4 Posts
    2k Views
    M
    Well, then resize it: @ widget.resize(new_width, new_height); @ The parameters are both integers.
  • Failed to start program. Path or permission wrong?

    5
    0 Votes
    5 Posts
    5k Views
    T
    I have the same issue. This message "Failed to start program. Path or permissions wrong?" shows up because qtcreator can't find Qt5Widgetsd.dll... but why? because i have it in /qtbase/libs/
  • [SOLVED] QLabel->isVisible always returns false

    10
    0 Votes
    10 Posts
    14k Views
    B
    Solved! Thanks Sam and willi4ms!
  • Images from MS Access database

    4
    0 Votes
    4 Posts
    2k Views
    R
    http://qt-project.org/forums/viewthread/12857
  • Doing multiple QNetworkRequest on the same QNetworkAccessManager

    9
    0 Votes
    9 Posts
    10k Views
    L
    Be aware that readyRead() only indicates that data is available, not necessarily that the reply has finished. If you want to pass information, for example a reference to the <code>VersionInfo</code> which was used to initiate the request you can use an "attribute":http://qt-project.org/doc/qt-5.0/qtnetwork/qnetworkrequest.html#setAttribute. QNetworkAccessManager provides a "finished":http://qt-project.org/doc/qt-5.0/qtnetwork/qnetworkaccessmanager.html#finished signal which passes the QNetworkReply. @ struct VersionInfo { ... }; Q_DECLARE_METATYPE(VersionInfo*) static const QNetworkRequest::Attribute VersionInfoAttribute = QNetworkRequest::User; ... connect(m_manager, &QNetworkAccessManager::finished, [](QNetworkReply reply) { VersionInfo versionInfo = reply->request().attribute(VersionInfoAttribute) .value<VersionInfo*>(); if (versionInfo != nullptr) { versionInfo->... } reply->deleteLater(); }); ... for (int counter = 0; counter < m_versionList.size(); counter++) { QNetworkRequest request; request.setAttribute(VersionInfoAttribute, QVariant::fromValue<VersionInfo*>(&m_versionList[counter])); request.setRawHeader("User-Agent", "Autoupdater"); request.setUrl(m_versionList[counter].changelog); m_manager->get(request); } @ If you don't want to connect to the finished(QNetworkReply*) signal (for instance because you are reusing the QNetworkAccessManager object and don't want to receive finished signals from other requests) you can use sender() (QNetworkReplyImpl is-a QNetworkReply).