Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • [SOLVED] Combobox menu question

    12
    0 Votes
    12 Posts
    10k Views
    A
    Code worked for me without modification (windows 7), but I am glad you got it sorted.
  • 0 Votes
    2 Posts
    2k Views
    G
    You should use "removeRows":http://doc.qt.nokia.com/4.7/qstandarditemmodel.html#removeRows
  • How can we create custom slider?

    6
    0 Votes
    6 Posts
    6k Views
    P
    thank's
  • [SOLVED] combobox font question

    9
    0 Votes
    9 Posts
    14k Views
    K
    that's strange Gerolf, its still not working for me. i am using vista. but that's ok, because i am using a style sheet and that works good.
  • QDockWidget will not go from Floating back to the docked state, why?

    6
    0 Votes
    6 Posts
    10k Views
    R
    I have kind of the same problem like jeremy_c, only in my case everything workes great if I have the MainWindow in window mode. As soon as I set the window to fullscreen the docking will not work anymore. The interesting part is, that the location where the QDockWidget should dock has even more free space then it has in window mode? I use the QDockWidget with QtDesigner and set all flags I need there. Any suggestions?
  • Convert QColor and QSize from and to QString

    6
    0 Votes
    6 Posts
    14k Views
    G
    There are no built in methods for QColor for doing that. You'll have to write your own. You might want to take the implementation for the [[Doc:QDataStream]] support as a start.
  • Connect to a database from inside or outside the network.

    11
    0 Votes
    11 Posts
    8k Views
    B
    Thank you both for your input. I did lots of reading and testing of different DNS servers, and to be honest, a lot of it went over my head. The 'Simple' in the name of this one I'm trying to use was quite attractive. I realise that I could simply ask our staff to use 192.168.x.x to see the site inside the network, and I could use Volker's earlier idea of using a variable in the application to connect to the database at the right address - internal IP or domain name. I could do that, but I think it would confuse people. Maybe that's not a good reason though. Both of your ideas on how to fix this easily sound good, but I'm really not sure how I would actually implement them. Sorry to sound a bit useless. Right now I'm thinking that I might stick with my plan of updating the configuration file of the DNS server when the dynamic IP changes. I realised I can move the config file to somewhere within the web server, change the file with PHP (which I have a lot of experience with) and update the server by a command line command. (It's Windows by the way). I would love to do this a simple way, but as I said, I'm not really understanding the simple way. Thanks for your help.
  • ActiveQt problem

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • How to record and play sound simultaneously

    13
    0 Votes
    13 Posts
    11k Views
    S
    @vidar: If you are on stackoverflow, then you can post your answer there. I have asked this question there with a bounty of 100 reputations, and your answer is the one which helped me most. I think you deserve this bounty :-) . The question can be found "here":http://stackoverflow.com/questions/7776022/.
  • How can we know the width and height of string ?

    3
    0 Votes
    3 Posts
    2k Views
    AlicemirrorA
    In QML you can also use the paintedHeight and width properties. Take care of a detail (not sure it is a bug): When you use a word-wrapped string you should forcerly add a '\n' character ad the end of the string else the painted properties alway returns the corresponding sized minus the last wrapped line.
  • [Solved]how to add combo box in trayicon menu?

    20
    0 Votes
    20 Posts
    13k Views
    M
    Thanks Every one thanks for your support and petience. It is working now. I had to use both in particular order.
  • Gstreamer display QWidget

    3
    0 Votes
    3 Posts
    5k Views
    G
    If I interpret the code correctly, you place a frame onto the VideoDisplay. Afterwards you stream the video into the VideoDisplay hich has a full overlay by a frame... You can't see anything, as you see the frame, Try to remove it and see what happens...
  • Drop image into a QLabel

    3
    0 Votes
    3 Posts
    7k Views
    G
    Mime type "image/*" is not valid. I'm pretty sure you have something like "image/jpeg" or the like. You can use the dropsite app from src/examples/draganddrop to look what's actually inside the drop. Anyways, I would use method "QMimeData::imageData() ":http://doc.qt.nokia.com/4.7/qmimedata.html#imageData to extract the image from the drop data.
  • How to access child rectitems

    2
    0 Votes
    2 Posts
    2k Views
    F
    Not sure, but maybe "this":http://doc.qt.nokia.com/latest/qgraphicsitem.html#childItems could help.
  • [Solved] Sqlite and concurrency

    5
    0 Votes
    5 Posts
    7k Views
    F
    The problem probably lies in the "next":http://doc.qt.nokia.com/latest/qsqlquery.html#next method (and others like this). Usually queries are managed using cursors (it should be true also for qt), and a set of results are retrieved (and sometimes cached) from the database. Now this lead to the fact that the cursor provides a read lock on the tuples you wanted to update from the other terminal. And this leads to the error you were experiencing. Destroyng the query object means releasing the cursor, so the lock, and the trick is done. More complex databases use approaches like "MVCC" to allow a better concurrency even in this scenario.
  • QProgressBar font color change during progress

    7
    0 Votes
    7 Posts
    9k Views
    JeroentjehomeJ
    Hmm, why is stylesheet evil?? Even in Designer you can edit it and on run time alter it if you like. Works fine with me. So Erapid, what is so terrible about it? greetz
  • How can we close the opend Url through program?

    2
    0 Votes
    2 Posts
    2k Views
    L
    Well, I think there is no easy way of doing that. At first sight I would say use QProcess to spawn the external process on your own. Take a look at qdesktopservices.cpp on how to do this in a platform-independent manner.
  • QT, MySQL and BLOB

    7
    0 Votes
    7 Posts
    12k Views
    R
    Though i am new in qt platform and also the post has been given by you many days ago,then i can probably give you the solution...here don't use backslashes instead of front slashes in "INCLUDEPATH" "LIBS" use like below: cd %QTDIR%\src\plugins\sqldrivers\mysql qmake "INCLUDEPATH+=C:/MySQL/include" "LIBS+=C:/MYSQL/MySQL Server <version>/lib/opt/libmysql.lib" mysql.pro mingw32-make ........ this will remove this problem WARNING: (internal):1: Unescaped backslashes are deprecated. WARNING: (internal):1: Unescaped backslashes are deprecated. WARNING: (internal):1: Unescaped backslashes are deprecated. and you also need to notice that you put correct libmysql.dll from mysql that is u used for build with qt.........if u follow this things you can get rid of this problem.....best of luck sorry for my bad english.....
  • Coding objects in GroupBox in a main layout

    2
    0 Votes
    2 Posts
    4k Views
    M
    Well, I'm not sure what you meant, but if you want your gridLayout (containing those toolbuttons) to be inside groupBox, shouldn't you put the gridLayout inside your groupBox? Something like this: [code] // Make grid QGridLayout *gridLayout = ... for(int i = 0; ...) ... gridLayout->addWidget(toolButton, i, j); // Make groupbox and set layout groupBox = new QGroupBox; QVBoxLayout groupBoxLayout = new QVBoxLayout; groupBox->setLayout(groupBoxLayout); // Add things to groupbox (via layout) groupBoxLayout->addLayout(gridLayout); groupBoxLayout->addWidget(new QLabel); [/code] ...And then put groupBox to dialog? EDIT: I mean, it seems that you add your grid to main layout (line 12), and not in your groupbox's layout.
  • Maximum does't effect on my widget

    3
    0 Votes
    3 Posts
    2k Views
    K
    i don't have it now, i will check and reply as soon as possible