Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I want to create custom widget with ui form, but if I add ui form to the widget, it is not showing when building widget.
Shortly, I want to add one button and one textedit into a ui form, and create a custom widget with that, is there an example like this, or how do I do it?
It is very simple to create your custom widget and add it to your ui form. Just follow this:
1- Create a default Qt Widgets Project width ui form.
2- Right click on youe project in Projects window and click 'Add New'
3- Select 'C++ Class' and click 'Choose...'
4- Enter your custom widget name and select "QWidget" as "Base class" and click "Next' and then 'Finish'.
5- In the form editor, add a Widget to the form and then right click on it.
6- From the popup menu , select "Promote to..."
7- In dialog that is displayed, enter your custom widget name in the "promoted class name" field and click add.
8- Select custom widget from list and click "promote"
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am a Visual Studio MFC newbie, and have been a bit perplexed by a problem over the last couple of days. When I create a radio button and assign it variable, I get a "Debug Assertion Failed". How should I make the radio button a variable?
You have to make sure that the first radio button in a sequence of radio buttons is of style WS_GROUP. It is a style you can set in the dialog editor by selecting the first radio button and setting its style to Group.
You want to use an int as the type to receive/set and only use DDX_Radio() on the first radio button on the group. It will return 0 if first radio selected, 1 if second, 2 if third, etc... Make sure the value you use, a member variable is initially set to 0 or another valid value.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have link on ID column, when user click on link there is an EDIT button.
When click on EDIT user can make changes.
But, I want to ensure that two users can't edit in same time, and when one user click on edit that all users can't see edit button till save/commit record.
Also to leave message eg. Record is editing by another user, please try later.
I can add one column in table eg. editing number(1), but how to change this column to 1.
when user click on EDIT button?
To give an answer on you question:
You can create a dynamic action which will be triggered on pageLoad. That DA should then update the column to 1 or Y.
!! Warning:
But how will you make sure, that the column will be updated back to 0 or N? Buttons and actions which closes the modal, can update the column back to its initial state, but the X - Close Window button won't. And what if your browser closes or crashes?
In that case, you would be left with a record, which can't be edited anymore by anyone, since that record is still indicated as currently being edited.
I strongly advise not to go down that road!
Instead, trust Oracle APEX's Prevent Lost Updates and Lock Row mechanism's. These are available in the Settings part of the Automatic Row Processing process.
Forgive me if this question is silly but I want to know
if there is a way to change the content of a menu bar in different
page on a stacked widget directly in qt designer.
For example I want the menu of the menu bar for page 1 of the stacked widget to be menu, inbox, multimedia, exit. For the second page I want the menu bar to contain the following menu; Text, outbox, contact, back. The reason is because
I want different menu controls for different pages of the
QstackeWidget. Is this possible from the qt designer ui or I'll have
to ultimately do it programatically?
As far as I know (which is QtCreator 3.3.0) the Creator only supports graphically inserting and editing a menu bar in QMainWindow. So for the first part of your question: Yes, you probably have to create the menus programmatically.
For the second part, it is possible to insert a menu bar in any given layout using QLayout::setMenuBar. This also includes the layout inside your stacked widget.
See also: Can you add a toolbar to QDialog?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have a combobox that holds a list of different command types. I want to change the visible input fields on my GUI depending on the selected command in the combobox. I am very new to Qt, and I would appreciate it if someone could point me in the right direction to implementing this.
My current idea is to have a "select" button that emits a signal, and the connected slot will grab the current index of the combobox. I THINK I need to implement a custom class to hold a QFrame. The custom class will hold slots that indicate which data inputs (for the selected command) should be displayed in the QFrame.
IE, if COMMAND_1 is selected in the combobox, 3 input fields display in the QFrame. If COMMAND_2 is selected, a pair of radio buttons is displayed in the QFrame, and those 3 input fields are hidden or deallocated.
Is this a good way of attempting to solve this problem?
You're going about it the right way. But Qt actually makes it even easier than what you're thinking.
You can use two built-in widgets: QComboBox and QStackedWidget. You're familiar with the combo box; the stacked widget is a set of widgets, of which only one will be displayed at a time. It's essentially a tabbed widget minus the tabs.
Set up your stacked widget so that its first widget is what you want to show when your combo box is showing its first option, the second for the second, and so on. Then you can connect a built-in signal to a built-in slot: QComboBox::currentIndexChanged(int) to QStackedWidget::setCurrentIndex(int).
Hope that helps!
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a site that requires an iframe for inserting a reservation widget into a Joomla article. I have no problems displaying the iframe in the article, but the problem is the template is also displaying in the article. It's as if the iframe wraps the entire site inside the article also. I only need the reservation widget to appear. You can see it here http://www.archersinn.com/reservations. The reservations widget is a third party my client uses so I just need to figure out how to display it properly. Any ideas?
You can show only the component using this parameter at the end of your joomla url
?tmpl=component
http://www.archersinn.com/reservations?tmpl=component
But you need to do this before this page.
In the page you insert your code for reservations you have style from Joomla, but is not joomla, I'm right?
In your iframe you are calling an external webpage. If you got control over the look and feel of the external widget site, you may configure that page to look like your current page - http://www.archersinn.com/reservations, with the introduction and title etc.
Instead of linking the menu item reservations to an article within your site, you may consider pointing the menu item to the external site - https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=H4LUxh0dk0&type=raw. Change the menu item type to External Link and set to open it in the parent window.
The iframe is pointing to https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=w36FN02v7M&type=raw but that site has made a custom template for you so that it matches the look and feel of your website.
So it's not supposed to be an iframe at all. Just change the URL of the Reservation button to the following and you should be sorted: https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=w36FN02v7M&type=raw
Many booking systems do it this way. They have the booking engine on their own system and redirect back to your website at the end of the transaction.